commit b532470e9360f2a090d61f134bedb66c5cc4d8f5
Author: Christophe Fergeau <[email protected]>
Date:   Mon Oct 19 14:22:06 2009 +0200

    delete invalid HashInfo files
    
    HashInfo files have to match the device UUID to be usable for signing.
    When we meet an HashInfo file which doesn't match the current device,
    it's better to remove it so that we don't attempt to use it to sign
    iTunesDB with it.

 src/itdb_hash72.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/itdb_hash72.c b/src/itdb_hash72.c
index d9e028d..23c0b3d 100644
--- a/src/itdb_hash72.c
+++ b/src/itdb_hash72.c
@@ -10,6 +10,8 @@
 #include <string.h>
 #include "rijndael.h"
 
+#include <glib/gstdio.h>
+
 #include "itdb_device.h"
 #include "db-itunes-parser.h"
 #include "itdb_private.h"
@@ -186,6 +188,11 @@ static struct Hash78Info *read_hash_info (const 
Itdb_Device *device)
        return NULL;
     }
     if (memcmp (info->uuid, uuid, sizeof (uuid)) != 0) {
+       /* the HashInfo file seems invalid for this device, just remove it
+        */
+       filename = get_hash_info_path (device);
+       g_unlink (filename);
+       g_free (filename);
        g_free (info);
        return NULL;
     }

------------------------------------------------------------------------------
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