From 6ffcd51d1809a61f28cd6cb4ba97ef9b05bd144c Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Sat, 16 Nov 1996 22:22:32 +0000 Subject: [PATCH] Fix type mismatch. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@991 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/otp/otp_parse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/otp/otp_parse.c b/lib/otp/otp_parse.c index 0df030b2c..c349cab60 100644 --- a/lib/otp/otp_parse.c +++ b/lib/otp/otp_parse.c @@ -2146,12 +2146,13 @@ get_altword (char *s, void *a) { OtpAlgorithm *alg = (OtpAlgorithm *)a; int ret; - char *res = malloc(alg->hashsize); + unsigned char *res = malloc(alg->hashsize); if (res == NULL) return -1; alg->hash (s, strlen(s), res); - ret = res[alg->hashsize - 1] | ((res[alg->hashsize - 2] & 0x03) << 8); + ret = (unsigned)(res[alg->hashsize - 1]) | + ((res[alg->hashsize - 2] & 0x03) << 8); free (res); return ret; }