commit c24124412318ab4598e2093c1ce598de3e06a92a
Author: Christophe Fergeau <[email protected]>
Date:   Mon Oct 19 23:12:25 2009 +0200

    sizeof doesn't work on sized arrays passed as function parameters

 src/itdb_hash72.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/itdb_hash72.c b/src/itdb_hash72.c
index fb5314b..83c984a 100644
--- a/src/itdb_hash72.c
+++ b/src/itdb_hash72.c
@@ -70,7 +70,7 @@ static int hash_extract(const uint8_t signature[46],
        }
 
        memcpy(iv, output, 16);
-       memcpy(random_bytes, &signature[2], sizeof(random_bytes));
+       memcpy(random_bytes, &signature[2], 12);
 
        return 0;
 }
@@ -118,7 +118,7 @@ static gboolean get_uuid (const Itdb_Device *device, 
unsigned char uuid[20])
     if (uuid_str == NULL) {
        return FALSE;
     }
-    result = string_to_hex (uuid, sizeof (uuid), uuid_str);
+    result = string_to_hex (uuid, 20, uuid_str);
 
     return (result == 0);
 }

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to