mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 22:25:47 +01:00
d696e7d91e
In `read_next_b64_code()`, the result of fgetc() is stored into a char, but later compared against EOF, which is generally -1. On platforms where char is unsigned, this generates a compiler warning/error that the comparison will never be true (causing a build failure). The value will never match, with the function ultimately bailing with a "Too many bad symbols are detected" error. On platforms with signed char, EOF is detected, but a file containing a 0xFF character will causes a premature end of file exit of the loop. Fix this by changing the result to an int. Fixes #3794. Signed-off-by: Nayna Jain <nayna@linux.ibm.com> Signed-off-by: David Brown <david.brown@linaro.org>
5 lines
170 B
Plaintext
5 lines
170 B
Plaintext
Bugfix
|
|
* Fix handling of EOF against 0xff bytes and on platforms with
|
|
unsigned chars. Fixes a build failure on platforms where char is
|
|
unsigned. Fixes #3794.
|