commit a932ccc3163bff8771af4f522f03785bf3733415
Author: Daniele Forsi <[email protected]>
Date: Sun Jul 31 15:53:25 2011 +0200
Fix "Buffer access out-of-bounds" found by cppcheck
Destination is 6 bytes while source is 6 byte + string terminator.
Use sizeof () on destination like a couple of lines below this.
Fixes:
[src/itdb_hash72.c:131]: (error) Buffer access out-of-bounds:
hash_info.header
src/itdb_hash72.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/itdb_hash72.c b/src/itdb_hash72.c
index e57c22f..ce61757 100644
--- a/src/itdb_hash72.c
+++ b/src/itdb_hash72.c
@@ -128,7 +128,7 @@ static gboolean write_hash_info (const Itdb_Device *device,
gboolean success;
const char header[] = "HASHv0";
- memcpy (hash_info.header, header, sizeof (header));
+ memcpy (hash_info.header, header, sizeof (hash_info.header));
success = itdb_device_get_hex_uuid (device, hash_info.uuid);
if (!success) {
return FALSE;
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2