diff options
Diffstat (limited to 'tools/creative.c')
-rw-r--r-- | tools/creative.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/creative.c b/tools/creative.c index 6e0e468411..5b8f15abc0 100644 --- a/tools/creative.c +++ b/tools/creative.c | |||
@@ -52,7 +52,7 @@ extern unsigned int le2int(unsigned char* buf); | |||
52 | static int make_ciff_file(unsigned char *inbuf, int length, | 52 | static int make_ciff_file(unsigned char *inbuf, int length, |
53 | unsigned char *outbuf, int device) | 53 | unsigned char *outbuf, int device) |
54 | { | 54 | { |
55 | char key[20]; | 55 | unsigned char key[20]; |
56 | memcpy(outbuf, "FFIC", 4); | 56 | memcpy(outbuf, "FFIC", 4); |
57 | int2le(length+90, &outbuf[4]); | 57 | int2le(length+90, &outbuf[4]); |
58 | memcpy(&outbuf[8], "FNIC", 4); | 58 | memcpy(&outbuf[8], "FNIC", 4); |
@@ -68,8 +68,8 @@ static int make_ciff_file(unsigned char *inbuf, int length, | |||
68 | memcpy(&outbuf[0x98+length], "LLUN", 4); | 68 | memcpy(&outbuf[0x98+length], "LLUN", 4); |
69 | int2le(20, &outbuf[0x98+length+4]); | 69 | int2le(20, &outbuf[0x98+length+4]); |
70 | /* Do checksum */ | 70 | /* Do checksum */ |
71 | hmac_sha((char *)devices[device].null, strlen(devices[device].null), | 71 | hmac_sha((unsigned char *)devices[device].null, strlen(devices[device].null), |
72 | (char *)outbuf, 0x98+length, key, 20); | 72 | outbuf, 0x98+length, key, 20); |
73 | memcpy(&outbuf[0x98+length+8], key, 20); | 73 | memcpy(&outbuf[0x98+length+8], key, 20); |
74 | return length+0x90+0x1C+8; | 74 | return length+0x90+0x1C+8; |
75 | } | 75 | } |