diff options
Diffstat (limited to 'engines/ccgost/gost_crypt.c')
-rw-r--r-- | engines/ccgost/gost_crypt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/ccgost/gost_crypt.c b/engines/ccgost/gost_crypt.c index 52aef15acf..15ab02aabb 100644 --- a/engines/ccgost/gost_crypt.c +++ b/engines/ccgost/gost_crypt.c @@ -241,13 +241,13 @@ static void gost_cnt_next (void *ctx, unsigned char *iv, unsigned char *buf) { memcpy(buf1,iv,8); } - g = buf1[0]|(buf1[1]<<8)|(buf1[2]<<16)|(buf1[3]<<24); + g = buf1[0]|(buf1[1]<<8)|(buf1[2]<<16)|((word32)buf1[3]<<24); g += 0x01010101; buf1[0]=(unsigned char)(g&0xff); buf1[1]=(unsigned char)((g>>8)&0xff); buf1[2]=(unsigned char)((g>>16)&0xff); buf1[3]=(unsigned char)((g>>24)&0xff); - g = buf1[4]|(buf1[5]<<8)|(buf1[6]<<16)|(buf1[7]<<24); + g = buf1[4]|(buf1[5]<<8)|(buf1[6]<<16)|((word32)buf1[7]<<24); go = g; g += 0x01010104; if (go > g) /* overflow*/ |