mirror of
https://git.zap.org.au/git/trader.git
synced 2025-02-02 15:08:13 -05:00
Bug fix: if "char" is unsigned (as on some architectures), b64decode() fails
This commit is contained in:
parent
3d390967af
commit
6433c44dee
7
NEWS
7
NEWS
@ -15,6 +15,13 @@ browse the Git repository on The ZAP Group web server at the following
|
|||||||
location: http://www.zap.org.au/gitweb/trader.git
|
location: http://www.zap.org.au/gitweb/trader.git
|
||||||
|
|
||||||
|
|
||||||
|
Version 7.11 (not yet released)
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
Minor bug fix: some architectures treat "char" as "unsigned char", and
|
||||||
|
this caused b64decode() to fail.
|
||||||
|
|
||||||
|
|
||||||
Version 7.10 (2nd June, 2017)
|
Version 7.10 (2nd June, 2017)
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
|
@ -873,7 +873,7 @@ ssize_t b64decode (const void *restrict in, size_t inlen,
|
|||||||
n = 1;
|
n = 1;
|
||||||
|
|
||||||
for (size_t i = 0; i < inlen && *u_in != '\0'; i++, u_in++) {
|
for (size_t i = 0; i < inlen && *u_in != '\0'; i++, u_in++) {
|
||||||
char c = *u_in > UNSCRAMBLE_TABLE_SIZE ?
|
signed char c = *u_in > UNSCRAMBLE_TABLE_SIZE ?
|
||||||
UNSCRAMBLE_INVALID : unscramble_table[*u_in];
|
UNSCRAMBLE_INVALID : unscramble_table[*u_in];
|
||||||
|
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
Loading…
Reference in New Issue
Block a user