Cast to unsigned char before passing it as uint32_t

pull/821/head
Tatsuhiro Tsujikawa 2016-12-31 14:28:11 +09:00
parent b9e51e9b15
commit b5d64230ba
1 changed files with 2 additions and 1 deletions

View File

@ -1125,7 +1125,8 @@ ssize_t parse_content_disposition(char* dest, size_t destlen,
case CD_VALUE_CHARS: case CD_VALUE_CHARS:
if (inRFC5987AttrChar(*p)) { if (inRFC5987AttrChar(*p)) {
if (charset == CD_ENC_UTF8) { if (charset == CD_ENC_UTF8) {
if (utf8dfa(&dfa_state, &dfa_code, *p) == UTF8_REJECT) { if (utf8dfa(&dfa_state, &dfa_code, static_cast<unsigned char>(*p)) ==
UTF8_REJECT) {
return -1; return -1;
} }
} }