commit af3bb68add1c40d19d0dee382009e21b0870a38f from: NRK via: Hiltjo Posthuma date: Fri Mar 18 11:11:27 2022 UTC 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. commit - 2aefa348baf4b702fdce98eb105bcba175d8283f commit + af3bb68add1c40d19d0dee382009e21b0870a38f blob - c71fa0677ee40d7ba71b5b67fbb70b4386500be8 blob + 1307fdf4ab3afee8d16af827b1a04a99152cf1ec --- st.c +++ st.c @@ -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 */ }