mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
core: fix integer overflow in base32 encoding/decoding
This commit is contained in:
@@ -20,6 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: fix integer overflow in base32 encoding/decoding
|
||||
* core: fix integer overflow with decimal numbers in calculation of expression
|
||||
* core, plugins: fix integer overflow in loops (issue #2178)
|
||||
* core: fix crash in case of NULL message sent to function gui_chat_printf_y_date_tags (issue #1883)
|
||||
|
||||
@@ -3416,7 +3416,8 @@ int
|
||||
string_base32_encode (const char *from, int length, char *to)
|
||||
{
|
||||
unsigned char base32_table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
|
||||
int count, value, next, bits_left, pad, index;
|
||||
unsigned int value;
|
||||
int count, next, bits_left, pad, index;
|
||||
int length_padding[8] = { 0, 0, 6, 0, 4, 3, 0, 2 };
|
||||
|
||||
if (!from || !to)
|
||||
@@ -3494,7 +3495,8 @@ int
|
||||
string_base32_decode (const char *from, char *to)
|
||||
{
|
||||
const char *ptr_from;
|
||||
int value, bits_left, count;
|
||||
int bits_left, count;
|
||||
unsigned int value;
|
||||
unsigned char c;
|
||||
|
||||
if (!from || !to)
|
||||
|
||||
Reference in New Issue
Block a user