Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/libgpod-0.8.3/tests/test-sysinfo-extended-parsing.c
Examining data/libgpod-0.8.3/tests/test-rebuild-db.cc
Examining data/libgpod-0.8.3/tests/test-ls.c
Examining data/libgpod-0.8.3/tests/test-cp.cc
Examining data/libgpod-0.8.3/tests/test-covers.c
Examining data/libgpod-0.8.3/tests/test-write-covers.c
Examining data/libgpod-0.8.3/tests/itdb_main.c
Examining data/libgpod-0.8.3/tests/test-fw-id.c
Examining data/libgpod-0.8.3/tests/test-photos.c
Examining data/libgpod-0.8.3/tests/get-timezone.c
Examining data/libgpod-0.8.3/tests/test-init-ipod.c
Examining data/libgpod-0.8.3/tools/itdb-syslog.h
Examining data/libgpod-0.8.3/tools/ipod-scsi.c
Examining data/libgpod-0.8.3/tools/read-sysinfoextended.c
Examining data/libgpod-0.8.3/tools/ipod-lockdown.c
Examining data/libgpod-0.8.3/tools/udev-backend.c
Examining data/libgpod-0.8.3/tools/hal-backend.c
Examining data/libgpod-0.8.3/tools/ipod-usb.c
Examining data/libgpod-0.8.3/tools/iphone-callout.c
Examining data/libgpod-0.8.3/tools/backends.h
Examining data/libgpod-0.8.3/tools/ipod-time-sync.c
Examining data/libgpod-0.8.3/tools/itdb-syslog.c
Examining data/libgpod-0.8.3/tools/generic-callout.c
Examining data/libgpod-0.8.3/src/itdb_sysinfo_extended_parser.h
Examining data/libgpod-0.8.3/src/rijndael.h
Examining data/libgpod-0.8.3/src/itdb_hash58.c
Examining data/libgpod-0.8.3/src/itdb_device.h
Examining data/libgpod-0.8.3/src/itdb_sqlite.c
Examining data/libgpod-0.8.3/src/itdb_zlib.h
Examining data/libgpod-0.8.3/src/db-artwork-writer.c
Examining data/libgpod-0.8.3/src/itdb_plist.c
Examining data/libgpod-0.8.3/src/db-image-parser.h
Examining data/libgpod-0.8.3/src/itdb.h
Examining data/libgpod-0.8.3/src/rijndael.c
Examining data/libgpod-0.8.3/src/itdb_tzinfo.c
Examining data/libgpod-0.8.3/src/db-parse-context.h
Examining data/libgpod-0.8.3/src/db-artwork-parser.h
Examining data/libgpod-0.8.3/src/itdb_iphone.c
Examining data/libgpod-0.8.3/src/itdb_photoalbum.c
Examining data/libgpod-0.8.3/src/db-parse-context.c
Examining data/libgpod-0.8.3/src/db-artwork-debug.c
Examining data/libgpod-0.8.3/src/itdb_endianness.h
Examining data/libgpod-0.8.3/src/itdb_track.c
Examining data/libgpod-0.8.3/src/itdb_hashAB.c
Examining data/libgpod-0.8.3/src/itdb_tzinfo_data.h
Examining data/libgpod-0.8.3/src/itdb_hash72.c
Examining data/libgpod-0.8.3/src/itdb_playlist.c
Examining data/libgpod-0.8.3/src/itdb_device.c
Examining data/libgpod-0.8.3/src/itdb_private.h
Examining data/libgpod-0.8.3/src/pixmaps.h
Examining data/libgpod-0.8.3/src/itdb_thumb.c
Examining data/libgpod-0.8.3/src/itdb_artwork.c
Examining data/libgpod-0.8.3/src/db-itunes-parser.h
Examining data/libgpod-0.8.3/src/pixmaps.c
Examining data/libgpod-0.8.3/src/itdb_zlib.c
Examining data/libgpod-0.8.3/src/db-image-parser.c
Examining data/libgpod-0.8.3/src/itdb_plist.h
Examining data/libgpod-0.8.3/src/db-artwork-debug.h
Examining data/libgpod-0.8.3/src/itdb_sqlite_queries.h
Examining data/libgpod-0.8.3/src/db-artwork-parser.c
Examining data/libgpod-0.8.3/src/itdb_chapterdata.c
Examining data/libgpod-0.8.3/src/itdb_thumb.h
Examining data/libgpod-0.8.3/src/itdb_sysinfo_extended_parser.c
Examining data/libgpod-0.8.3/src/ithumb-writer.c
Examining data/libgpod-0.8.3/src/itdb_itunesdb.c

FINAL RESULTS:

data/libgpod-0.8.3/src/db-artwork-debug.c:212:52:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	g_print ("\tRandom: %02x\n", GUINT_FROM_LE (mhba->random));
data/libgpod-0.8.3/src/db-artwork-parser.c:323:24:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	album->random = mhba->random;
data/libgpod-0.8.3/src/db-artwork-writer.c:640:24:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	mhba->random = album->random;
data/libgpod-0.8.3/src/db-itunes-parser.h:613:9:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	guint8 random;     /* show the slides in random order (from iPhoto
data/libgpod-0.8.3/src/itdb.h:1065:12:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    guint8 random;
data/libgpod-0.8.3/src/itdb_itunesdb.c:1422:26:  [3] (random) g_random_int:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    itdb->id = ((guint64)g_random_int () << 32) |
data/libgpod-0.8.3/src/itdb_itunesdb.c:1423:12:  [3] (random) g_random_int:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	((guint64)g_random_int ());
data/libgpod-0.8.3/src/itdb_itunesdb.c:1424:33:  [3] (random) g_random_int:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    itdb->priv->pid = ((guint64)g_random_int () << 32) |
data/libgpod-0.8.3/src/itdb_itunesdb.c:1425:12:  [3] (random) g_random_int:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	((guint64)g_random_int ());
data/libgpod-0.8.3/src/itdb_itunesdb.c:5769:28:  [3] (random) g_random_int:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    id->sql_id = ((guint64)g_random_int () << 32) | ((guint64)g_random_int ()); 
data/libgpod-0.8.3/src/itdb_itunesdb.c:5769:63:  [3] (random) g_random_int:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    id->sql_id = ((guint64)g_random_int () << 32) | ((guint64)g_random_int ()); 
data/libgpod-0.8.3/src/itdb_itunesdb.c:7245:16:  [3] (random) g_random_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	gint32 rand = g_random_int_range (0, 899999); /* 0 to 900000 */
data/libgpod-0.8.3/src/itdb_itunesdb.c:7273:12:  [3] (random) g_random_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	dir_num = g_random_int_range (0, musicdirs_number);
data/libgpod-0.8.3/src/itdb_playlist.c:711:16:  [3] (random) g_random_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	gint32 rand = g_random_int_range (0, nr);
data/libgpod-0.8.3/src/itdb_playlist.c:1331:21:  [3] (random) g_random_int:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	    id = ((guint64)g_random_int () << 32) |
data/libgpod-0.8.3/src/itdb_playlist.c:1332:13:  [3] (random) g_random_int:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		((guint64)g_random_int ());
data/libgpod-0.8.3/src/itdb_sqlite.c:2281:27:  [3] (buffer) g_get_tmp_dir:
  This function is synonymous with 'getenv("TMP")';it returns untrustable
  input if the environment can beset by an attacker. It can have any content
  and length, and the same variable can be set more than once (CWE-807,
  CWE-20). Check environment variables carefully before using them.
    tmpdir = g_build_path(g_get_tmp_dir(), tmpnam(NULL), NULL);
data/libgpod-0.8.3/src/itdb_sqlite.c:2281:44:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
    tmpdir = g_build_path(g_get_tmp_dir(), tmpnam(NULL), NULL);
data/libgpod-0.8.3/src/itdb_track.c:182:21:  [3] (random) g_random_int:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	    id = ((guint64)g_random_int () << 32) |
data/libgpod-0.8.3/src/itdb_track.c:183:13:  [3] (random) g_random_int:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		((guint64)g_random_int ());
data/libgpod-0.8.3/tests/test-write-covers.c:105:11:  [3] (random) g_random_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
					     g_random_int_range (0, nb_covers));
data/libgpod-0.8.3/src/db-artwork-writer.c:261:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (mhod->string, string, len);
data/libgpod-0.8.3/src/db-artwork-writer.c:351:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy (mhod->string, string, len);
data/libgpod-0.8.3/src/db-itunes-parser.h:33:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:40:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:122:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:136:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:143:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:150:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:157:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:172:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:187:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:259:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:332:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:341:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:356:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:381:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:418:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:504:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:525:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:550:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:557:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:578:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:593:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:600:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:630:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:637:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/db-itunes-parser.h:647:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char header_id[4];
data/libgpod-0.8.3/src/itdb_artwork.c:96:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (dup, artwork, sizeof (Itdb_Artwork));
data/libgpod-0.8.3/src/itdb_artwork.c:656:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = fopen (filename, "r");
data/libgpod-0.8.3/src/itdb_chapterdata.c:108:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (dup, chapterdata, sizeof (Itdb_Chapterdata));
data/libgpod-0.8.3/src/itdb_chapterdata.c:214:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (new_chapter, chapter, sizeof (Itdb_Chapter));
data/libgpod-0.8.3/src/itdb_device.c:1041:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = fopen (sysinfo_path, "r");
data/libgpod-0.8.3/src/itdb_device.c:1111:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *sysinfo = fopen (sysfile, "w");
data/libgpod-0.8.3/src/itdb_device.c:1541:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int fd = open (path, O_RDONLY);
data/libgpod-0.8.3/src/itdb_device.c:1892:72:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
gboolean itdb_device_get_hex_uuid (const Itdb_Device *device, unsigned char uuid[20])
data/libgpod-0.8.3/src/itdb_device.h:189:88:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
G_GNUC_INTERNAL gboolean itdb_device_get_hex_uuid (const Itdb_Device *device, unsigned char uuid[20]);
data/libgpod-0.8.3/src/itdb_hash58.c:45:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char table1[256] = {
data/libgpod-0.8.3/src/itdb_hash58.c:80:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char table2[256] = {
data/libgpod-0.8.3/src/itdb_hash58.c:115:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char fixed[18] = {
data/libgpod-0.8.3/src/itdb_hash58.c:151:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char y[16];
data/libgpod-0.8.3/src/itdb_hash58.c:240:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char firewire_id[20];
data/libgpod-0.8.3/src/itdb_hash58.c:277:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (&header->hash58, checksum, len);
data/libgpod-0.8.3/src/itdb_hash58.c:280:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (&header->db_id, backup18, sizeof (backup18));
data/libgpod-0.8.3/src/itdb_hash58.c:281:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (&header->unk_0x32, backup32, sizeof (backup32));
data/libgpod-0.8.3/src/itdb_hash72.c:55:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(plaintext, sha1, 20);
data/libgpod-0.8.3/src/itdb_hash72.c:56:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&plaintext[20], random_bytes, 12);
data/libgpod-0.8.3/src/itdb_hash72.c:60:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&signature[2], random_bytes, 12);
data/libgpod-0.8.3/src/itdb_hash72.c:65:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&signature[14], output, 32);
data/libgpod-0.8.3/src/itdb_hash72.c:84:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(plaintext, sha1, 20);
data/libgpod-0.8.3/src/itdb_hash72.c:85:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&plaintext[20], &signature[2], 12);
data/libgpod-0.8.3/src/itdb_hash72.c:87:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(output, plaintext, 32);
data/libgpod-0.8.3/src/itdb_hash72.c:97:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(iv, output, 16);
data/libgpod-0.8.3/src/itdb_hash72.c:98:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(random_bytes, &signature[2], 12);
data/libgpod-0.8.3/src/itdb_hash72.c:104:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char header[6];
data/libgpod-0.8.3/src/itdb_hash72.c:105:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char uuid[20];
data/libgpod-0.8.3/src/itdb_hash72.c:106:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char rndpart[12];
data/libgpod-0.8.3/src/itdb_hash72.c:107:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char iv[16];
data/libgpod-0.8.3/src/itdb_hash72.c:123:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				 unsigned char iv[16],
data/libgpod-0.8.3/src/itdb_hash72.c:124:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				 unsigned char rndpart[12])
data/libgpod-0.8.3/src/itdb_hash72.c:152:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char uuid[20];
data/libgpod-0.8.3/src/itdb_hash72.c:183:57:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static void itdb_hash72_compute_itunesdb_sha1 (unsigned char *itdb_data, 
data/libgpod-0.8.3/src/itdb_hash72.c:185:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
					       unsigned char sha1[20])
data/libgpod-0.8.3/src/itdb_hash72.c:214:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (&header->db_id, backup18, sizeof (backup18));
data/libgpod-0.8.3/src/itdb_hash72.c:215:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (&header->unk_0x32, backup32, sizeof (backup32));
data/libgpod-0.8.3/src/itdb_hashAB.c:40:39:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef void (*calcHashAB_t)(unsigned char target[57], const unsigned char sha1[20], const unsigned char uuid[20], const unsigned char rnd_bytes[23]);
data/libgpod-0.8.3/src/itdb_hashAB.c:40:71:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef void (*calcHashAB_t)(unsigned char target[57], const unsigned char sha1[20], const unsigned char uuid[20], const unsigned char rnd_bytes[23]);
data/libgpod-0.8.3/src/itdb_hashAB.c:40:101:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef void (*calcHashAB_t)(unsigned char target[57], const unsigned char sha1[20], const unsigned char uuid[20], const unsigned char rnd_bytes[23]);
data/libgpod-0.8.3/src/itdb_hashAB.c:40:131:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef void (*calcHashAB_t)(unsigned char target[57], const unsigned char sha1[20], const unsigned char uuid[20], const unsigned char rnd_bytes[23]);
data/libgpod-0.8.3/src/itdb_hashAB.c:70:57:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static void itdb_hashAB_compute_itunesdb_sha1 (unsigned char *itdb_data, 
data/libgpod-0.8.3/src/itdb_hashAB.c:72:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
					       unsigned char sha1[20])
data/libgpod-0.8.3/src/itdb_hashAB.c:102:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (&header->db_id, backup18, sizeof (backup18));
data/libgpod-0.8.3/src/itdb_hashAB.c:103:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (&header->unk_0x32, backup32, sizeof (backup32));
data/libgpod-0.8.3/src/itdb_hashAB.c:111:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char uuid[20];
data/libgpod-0.8.3/src/itdb_hashAB.c:112:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char rndpart[23] = "ABCDEFGHIJKLMNOPQRSTUVW";
data/libgpod-0.8.3/src/itdb_itunesdb.c:339:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&cts->le_reader, &LITTLE_ENDIAN_READER, sizeof (ByteReader));
data/libgpod-0.8.3/src/itdb_itunesdb.c:340:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&cts->be_reader, &BIG_ENDIAN_READER, sizeof (ByteReader));
data/libgpod-0.8.3/src/itdb_itunesdb.c:344:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&cts->le_reader, &BIG_ENDIAN_READER, sizeof (ByteReader));
data/libgpod-0.8.3/src/itdb_itunesdb.c:345:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&cts->be_reader, &LITTLE_ENDIAN_READER, sizeof (ByteReader));
data/libgpod-0.8.3/src/itdb_itunesdb.c:471:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (data, &cts->contents[seek], len);
data/libgpod-0.8.3/src/itdb_itunesdb.c:556:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (&n, &cts->contents[seek], 2);
data/libgpod-0.8.3/src/itdb_itunesdb.c:585:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (&n, &cts->contents[seek], 4);
data/libgpod-0.8.3/src/itdb_itunesdb.c:616:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (&n, &cts->contents[seek], 8);
data/libgpod-0.8.3/src/itdb_itunesdb.c:635:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (&n, &cts->contents[seek], 2);
data/libgpod-0.8.3/src/itdb_itunesdb.c:664:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (&n, &cts->contents[seek], 4);
data/libgpod-0.8.3/src/itdb_itunesdb.c:694:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (&n, &cts->contents[seek], 8);
data/libgpod-0.8.3/src/itdb_itunesdb.c:2244:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		  memcpy (&plitem->splpref, mhod.data.splpref,
data/libgpod-0.8.3/src/itdb_itunesdb.c:2256:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		  memcpy (&plitem->splrules, mhod.data.splrules,
data/libgpod-0.8.3/src/itdb_itunesdb.c:3410:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (&cts->contents[seek], data, len);
data/libgpod-0.8.3/src/itdb_playlist.c:1153:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (dup, splr, sizeof (Itdb_SPLRule));
data/libgpod-0.8.3/src/itdb_playlist.c:1181:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (pl_dup, pl, sizeof (Itdb_Playlist));
data/libgpod-0.8.3/src/itdb_playlist.c:1240:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (&dest->splpref, &src->splpref, sizeof (Itdb_SPLPref));
data/libgpod-0.8.3/src/itdb_playlist.c:1241:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (&dest->splrules, &src->splrules, sizeof (Itdb_SPLRules));
data/libgpod-0.8.3/src/itdb_sqlite.c:1724:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(buffer, "\x31\x01\x01\x00", 4);
data/libgpod-0.8.3/src/itdb_sqlite.c:1989:54:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static int cbk_calc_sha1_one_block(FILE *f, unsigned char sha1[20])
data/libgpod-0.8.3/src/itdb_sqlite.c:1992:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char block[BLOCK_SIZE];
data/libgpod-0.8.3/src/itdb_sqlite.c:2021:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(filename, "rb");
data/libgpod-0.8.3/src/itdb_sqlite.c:2027:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char sha1[20];
data/libgpod-0.8.3/src/itdb_track.c:325:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (tr_dup, tr, sizeof (Itdb_Track));
data/libgpod-0.8.3/src/itdb_tzinfo.c:101:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen (prefs_path, "r");
data/libgpod-0.8.3/src/itdb_zlib.c:46:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char out[CHUNK];
data/libgpod-0.8.3/src/itdb_zlib.c:138:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(new_contents, cts->contents, headerSize);
data/libgpod-0.8.3/src/itdb_zlib.c:193:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (new_contents, cts->contents, header_len);
data/libgpod-0.8.3/src/ithumb-writer.c:1057:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	writer->f = fopen (writer->filename, "ab");
data/libgpod-0.8.3/src/ithumb-writer.c:1265:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open (filename, O_RDWR, 0);
data/libgpod-0.8.3/src/rijndael.c:343:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(block, inbuf + blockno * sizeof(block), fraction);
data/libgpod-0.8.3/src/rijndael.c:370:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(block, inbuf + blockno * sizeof(block), fraction);
data/libgpod-0.8.3/src/rijndael.c:376:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(iv, block, sizeof(block));
data/libgpod-0.8.3/src/rijndael.c:377:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(outbuf + blockno * sizeof(block), block, sizeof(block));
data/libgpod-0.8.3/tests/test-ls.c:50:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char date[30];
data/libgpod-0.8.3/tools/generic-callout.c:78:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char int_str[4];
data/libgpod-0.8.3/tools/ipod-scsi.c:67:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[512];
data/libgpod-0.8.3/tools/ipod-scsi.c:73:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open (device, O_RDONLY);
data/libgpod-0.8.3/tools/ipod-scsi.c:85:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(offsets, start, len);
data/libgpod-0.8.3/tools/ipod-scsi.c:113:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open (device, O_RDWR);
data/libgpod-0.8.3/tools/read-sysinfoextended.c:104:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        bus_number = atoi (argv[1]);
data/libgpod-0.8.3/tools/read-sysinfoextended.c:105:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        device_number = atoi (argv[2]);
data/libgpod-0.8.3/tools/udev-backend.c:267:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        usb_bus_number = atoi (argv[2]);
data/libgpod-0.8.3/tools/udev-backend.c:268:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        usb_dev_number = atoi (argv[3]);
data/libgpod-0.8.3/src/db-artwork-writer.c:216:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy ((char *)mh->header_id, header_id, 4);
data/libgpod-0.8.3/src/db-artwork-writer.c:246:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen (string);
data/libgpod-0.8.3/src/db-artwork-writer.c:1043:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				   (guchar *)track->album, strlen (track->album));
data/libgpod-0.8.3/src/db-artwork-writer.c:1072:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				   strlen (fthumb->filename));
data/libgpod-0.8.3/src/itdb_device.c:1048:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		gint len = strlen (buf);
data/libgpod-0.8.3/src/itdb_device.c:1545:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    if (read (fd, buf, 4) == 4)
data/libgpod-0.8.3/src/itdb_device.c:1612:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    (cd_l + strlen (cd_l) - strlen ("itunes/itunes_control")))
data/libgpod-0.8.3/src/itdb_device.c:1612:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    (cd_l + strlen (cd_l) - strlen ("itunes/itunes_control")))
data/libgpod-0.8.3/src/itdb_device.c:1879:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (strlen(s) > array_size*2)
data/libgpod-0.8.3/src/itdb_device.c:2130:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen (serial);
data/libgpod-0.8.3/src/itdb_hash58.c:260:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    g_assert (strncmp (header->header_id, "mhbd", strlen ("mhbd")) == 0);
data/libgpod-0.8.3/src/itdb_hash72.c:197:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    g_assert (strncmp (header->header_id, "mhbd", strlen ("mhbd")) == 0);
data/libgpod-0.8.3/src/itdb_hash72.c:249:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    g_assert (strncmp (header->header_id, "mhbd", strlen ("mhbd")) == 0);
data/libgpod-0.8.3/src/itdb_hashAB.c:84:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    g_assert (strncmp (header->header_id, "mhbd", strlen ("mhbd")) == 0);
data/libgpod-0.8.3/src/itdb_iphone.c:177:6:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	    usleep(LOCK_WAIT);
data/libgpod-0.8.3/src/itdb_itunesdb.c:1931:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    g_return_val_if_fail (strlen (a) == 4, -1);
data/libgpod-0.8.3/src/itdb_itunesdb.c:3436:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    put_data (cts, string, strlen(string));
data/libgpod-0.8.3/src/itdb_itunesdb.c:3449:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    g_return_if_fail (strlen (header) == 4);
data/libgpod-0.8.3/src/itdb_itunesdb.c:4472:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  guint32 len = strlen (mhod->data.string);
data/libgpod-0.8.3/src/itdb_itunesdb.c:4493:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  guint32 len = strlen (mhod->data.string);
data/libgpod-0.8.3/src/itdb_itunesdb.c:6514:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	for (padlength = 256-strlen (path); padlength > 0; padlength--)
data/libgpod-0.8.3/src/itdb_itunesdb.c:7414:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen (mountpoint) >= strlen (dest_filename))
data/libgpod-0.8.3/src/itdb_itunesdb.c:7414:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen (mountpoint) >= strlen (dest_filename))
data/libgpod-0.8.3/src/itdb_itunesdb.c:7448:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen (suffix) > i)
data/libgpod-0.8.3/src/itdb_itunesdb.c:7457:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    mplen = strlen (mountpoint); /* length of mountpoint in bytes */
data/libgpod-0.8.3/src/itdb_itunesdb.c:7644:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bread = read (file_in, data, ITUNESDB_COPYBLK);
data/libgpod-0.8.3/src/itdb_itunesdb.c:8445:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (model_number && (strlen (model_number) != 0))
data/libgpod-0.8.3/src/itdb_sqlite.c:1516:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    for (i = 0; i < strlen(ipod_path); i++) {
data/libgpod-0.8.3/src/itdb_sqlite.c:1588:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (sval && strlen(sval)) {
data/libgpod-0.8.3/src/itdb_sqlite.c:1589:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		sval_uppercase = g_ascii_strup(sval, strlen(sval));
data/libgpod-0.8.3/src/itdb_sqlite.c:1654:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					sval_uppercase = g_ascii_strup(sval, strlen(sval));
data/libgpod-0.8.3/src/itdb_sysinfo_extended_parser.c:585:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    parsed_doc = itdb_plist_parse_from_memory (xml, strlen (xml), error);
data/libgpod-0.8.3/src/itdb_thumb.c:325:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen (item->filename) < 2) {
data/libgpod-0.8.3/src/itdb_tzinfo.c:355:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	strncmp (contents, TZ_MAGIC, strlen (TZ_MAGIC)) != 0) {
data/libgpod-0.8.3/src/ithumb-writer.c:1318:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    if (read (fd, buf, size) != size)
data/libgpod-0.8.3/tests/test-rebuild-db.cc:51:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (mountpoint[strlen(mountpoint)-1] == G_DIR_SEPARATOR) {
data/libgpod-0.8.3/tests/test-rebuild-db.cc:52:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		ipod_path = g_strdup (filename + strlen (mountpoint)-1);
data/libgpod-0.8.3/tests/test-rebuild-db.cc:54:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		ipod_path = g_strdup (filename + strlen (mountpoint));
data/libgpod-0.8.3/tests/test-rebuild-db.cc:59:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	g_print ("Mount point: %s (%d)\n", mountpoint, strlen (mountpoint));
data/libgpod-0.8.3/tools/generic-callout.c:83:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen (serial_number) < 11) {
data/libgpod-0.8.3/tools/generic-callout.c:90:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy (int_str, serial_number, 1);
data/libgpod-0.8.3/tools/generic-callout.c:94:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy (int_str, serial_number, 2);
data/libgpod-0.8.3/tools/generic-callout.c:98:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy (int_str, serial_number, 3);
data/libgpod-0.8.3/tools/generic-callout.c:568:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	   	if (strlen (control_path) >= strlen (ipod_mountpoint)) {
data/libgpod-0.8.3/tools/generic-callout.c:568:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	   	if (strlen (control_path) >= strlen (ipod_mountpoint)) {
data/libgpod-0.8.3/tools/generic-callout.c:570:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
						  control_path + strlen (ipod_mountpoint));
data/libgpod-0.8.3/tools/ipod-lockdown.c:220:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (AFC_E_SUCCESS != afc_file_write(afc, handle, xml, strlen(xml), &bytes_written)) {

ANALYSIS SUMMARY:

Hits = 186
Lines analyzed = 38135 in approximately 1.65 seconds (23140 lines/second)
Physical Source Lines of Code (SLOC) = 27293
Hits@level = [0] 192 [1]  47 [2] 118 [3]  21 [4]   0 [5]   0
Hits@level+ = [0+] 378 [1+] 186 [2+] 139 [3+]  21 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 13.8497 [1+] 6.81493 [2+] 5.09288 [3+] 0.769428 [4+]   0 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.