mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-25 18:52:22 -05:00
Fix undefined behaviour in left shift
This is not a problem with a usual compiler configuration, but LLVM/clang detects it when compiled with: -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error -ftrapv
This commit is contained in:
parent
3fb04bee85
commit
d8c80cd277
@ -136,7 +136,7 @@ char *fish_decrypt(const char *key, size_t keylen, const char *data) {
|
||||
for (i = 0; i < 12; i++) {
|
||||
d = fish_unbase64[(const unsigned char)*(data++)];
|
||||
if (d == IB) goto decrypt_end;
|
||||
binary[word] |= d << bit;
|
||||
binary[word] |= (unsigned long)d << bit;
|
||||
bit += 6;
|
||||
if (i == 5) {
|
||||
bit = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user