diff options
author | NRK <nrk@disroot.org> | 2022-03-18 16:20:54 +0600 |
---|---|---|
committer | rafa_99 <raroma09@gmail.com> | 2022-03-18 14:23:43 +0000 |
commit | 1b44f3fb070c2aa1b28a8273531ab6ee521e52de (patch) | |
tree | 15759f35875fd7df604482a7f89fe9a415241d9b | |
parent | 8f9014f522ddf220cdd5447b6f77b8d064253a4f (diff) |
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
@@ -372,7 +372,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 */ } |