mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Fix possible sign extension problem with newer compilers.
* cipher/des.c (READ_64BIT_DATA): Cast to u32 before shifting by 24.
* cipher/blowfish.c (do_encrypt_block): Ditto.
(do_decrypt_block): Ditto.
* cipher/camellia.c (CAMELLIA_RR8): Ditto.
* cipher/cast5.c (do_encrypt_block): Ditto.
(do_decrypt_block): Ditto.
(do_cast_setkey): Ditto.
* cipher/twofish.c (INPACK): Ditto.
* util/iobuf.c (block_filter): Ditto.
--
For cipher/des.c
Reported-by: Balint Reczey <balint@balintreczey.hu>
See commit 57af33d9e7
for details.
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
aa4a3aa3e7
commit
22caa5c2d4
6 changed files with 42 additions and 42 deletions
|
@ -738,7 +738,7 @@ block_filter(void *opaque, int control, IOBUF chain, byte *buf, size_t *ret_len)
|
|||
}
|
||||
}
|
||||
else if( c == 255 ) {
|
||||
a->size = iobuf_get(chain) << 24;
|
||||
a->size = (size_t)iobuf_get(chain) << 24;
|
||||
a->size |= iobuf_get(chain) << 16;
|
||||
a->size |= iobuf_get(chain) << 8;
|
||||
if( (c = iobuf_get(chain)) == -1 ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue