Specify field width for pairing hash

No field width was specified when the 128bit hash is converted to a string;
make sure we get 8 hex digits per 32bit hash component.
This commit is contained in:
Julien BLACHE 2010-01-25 17:51:17 +01:00
parent e6234c35ad
commit 854abd8026

View File

@ -274,7 +274,7 @@ itunes_pairing_hash(char *paircode, char *pin)
d = htobe32(d);
/* Write out the pairing hash */
snprintf(hash, sizeof(hash), "%0X%0X%0X%0X", a, b, c, d);
snprintf(hash, sizeof(hash), "%08X%08X%08X%08X", a, b, c, d);
return strdup(hash);
}