Browse Source

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.
master
NRK 2 years ago
committed by Hiltjo Posthuma
parent
commit
af3bb68add
  1. 2
      st.c

2
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 */
}

Loading…
Cancel
Save