From 022b9877c33dcf670ee48f56157c409c09c85a3d Mon Sep 17 00:00:00 2001 From: NRK Date: Fri, 18 Mar 2022 16:20:54 +0600 Subject: 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. --- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st.c b/st.c index 29b7462..7b755eb 100644 --- a/st.c +++ b/st.c @@ -377,7 +377,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 */ } -- cgit v1.2.3-70-g09d2