diff options
author | NRK <nrk@disroot.org> | 2022-03-18 16:20:54 +0600 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2024-05-12 21:20:50 +0200 |
commit | 3136763c15b67606c5181341b56513e25e744ab3 (patch) | |
tree | 8d6549db276972fef44490294edb126c752a6a26 | |
parent | cc55a688f096adaf959798517ba66eb9a3e40137 (diff) | |
download | st-3136763c15b67606c5181341b56513e25e744ab3.tar.gz |
avoid potential UB when using isprint()
all the ctype.h functions' argument must be representable as an unsigned
char or as EOF, otherwise the behavior is undefined.
-rw-r--r-- | st.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -367,7 +367,7 @@ static const char base64_digits[] = { char base64dec_getc(const char **src) { - while (**src && !isprint(**src)) + while (**src && !isprint((unsigned char)**src)) (*src)++; return **src ? *((*src)++) : '='; /* emulate padding if string ends */ } |