diff options
author | NRK <nrk@disroot.org> | 2022-03-18 16:20:54 +0600 |
---|---|---|
committer | sinanmohd <pcmsinan@gmail.com> | 2023-01-12 08:21:56 +0530 |
commit | 345097cf6bcf03352a025438f28540fc6a26fc0c (patch) | |
tree | ebe88e9542abdd9737a9c3993267a1a24c962f76 | |
parent | fb35e763cce79fefad915f44024781ac87ce4f85 (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
@@ -374,7 +374,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 */ } |