Skip to content

Commit b9fb213

Browse files
committed
cast argument as unsigned
1 parent 164de0f commit b9fb213

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/request_body_processor/multipart.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,11 @@ int Multipart::parse_content_disposition(const char *c_d_value, int offset) {
362362
const char* start_of_filename = p;
363363
while ((*p != '\0') && (*p != ';')) {
364364
if (*p == '%') {
365-
if ((*(p+1) == '\0') || (!isxdigit(*(p+1))) || (*(p+2) == '\0') || (!isxdigit(*(p+2)))) {
365+
if ((*(p+1) == '\0') || (!isxdigit(*(p+1))) || (*(p+2) == '\0') || (!isxdigit(static_cast<unsigned char>(*(p+2))))) {
366366
return -18;
367367
}
368368
p += 3;
369-
} else if (isalnum(*p) || strchr(attr_char_special, *p)) {
369+
} else if (isalnum(static_cast<unsigned char>(*p)) || strchr(attr_char_special, *p)) {
370370
p++;
371371
} else {
372372
return -19;

0 commit comments

Comments
 (0)