From: H. Peter Anvin Date: Wed, 12 May 2010 22:52:00 +0000 (-0700) Subject: libmenu/des.c: fix signedness error X-Git-Tag: syslinux-4.00-pre42~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e75aa434158d7df3b862842e54796386c814288;p=profile%2Fivi%2Fsyslinux.git libmenu/des.c: fix signedness error Fix a signedness error, which in turn was caused by needlessly complicated code. Signed-off-by: H. Peter Anvin --- diff --git a/com32/cmenu/libmenu/des.c b/com32/cmenu/libmenu/des.c index a058df8..37148b2 100644 --- a/com32/cmenu/libmenu/des.c +++ b/com32/cmenu/libmenu/des.c @@ -912,10 +912,9 @@ static int des_cipher(const char *in, char *out, my_u_int32_t salt, int count) void setkey(const char *key) { int i, j; - my_u_int32_t packed_keys[2]; - my_u_char_t *p; + char *p, packed_keys[8]; - p = (my_u_char_t *) packed_keys; + p = packed_keys; for (i = 0; i < 8; i++) { p[i] = 0; @@ -935,7 +934,7 @@ void encrypt(char *block, int flag) des_init(); setup_salt(0L); - p = block; + p = (my_u_char_t *)block; for (i = 0; i < 2; i++) { io[i] = 0L; for (j = 0; j < 32; j++)