aboutsummaryrefslogtreecommitdiffstats
path: root/com32/cmenu
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-05-12 15:52:00 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2010-05-12 15:52:00 -0700
commit2e75aa434158d7df3b862842e54796386c814288 (patch)
tree96b316453086ea9a82ebaa7a13337bd4bcd8a210 /com32/cmenu
parentea9654799db8c2a5206a4be75168691947df8798 (diff)
downloadsyslinux-2e75aa434158d7df3b862842e54796386c814288.tar.gz
syslinux-2e75aa434158d7df3b862842e54796386c814288.tar.xz
syslinux-2e75aa434158d7df3b862842e54796386c814288.zip
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 <hpa@linux.intel.com>
Diffstat (limited to 'com32/cmenu')
-rw-r--r--com32/cmenu/libmenu/des.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/com32/cmenu/libmenu/des.c b/com32/cmenu/libmenu/des.c
index a058df89..37148b24 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++)