Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
programs/ssl: Fixes incorrect EOF check in ssl_context_info.c
read_next_b64_code() function, that parses base64 encoded input doesn't recognize the EOF and returns when "Too many bad symbols are detected". This issue got identified when gcc complained for type-limit error during cmake. This patch fixes the issue by changing the variable type to int and removing type-cast of fgetc() output to 'char'. [[email protected]] The context info test stores the result of `fgetc` in a 'char'. On platforms with signed characters, reading a 0xFF byte will result in this character being -1, triggering an early end of file. On platforms with an unsigned char, all characters will be valid, but end of file won't be detected. Fixes Mbed-TLS#3794. Signed-off-by: Nayna Jain <[email protected]> Signed-off-by: David Brown <[email protected]>
- Loading branch information