mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
uri decode: changed the test for the existence of the next character
Fix for 64b6eceaba1a4
More info here
64b6eceaba (commitcomment-2714685)
This commit is contained in:
parent
64b6eceaba
commit
e1903e3ace
2
http.c
2
http.c
@ -2889,7 +2889,7 @@ evhttp_decode_uri_internal(
|
||||
decode_plus = 1;
|
||||
} else if (c == '+' && decode_plus) {
|
||||
c = ' ';
|
||||
} else if (length > 2 && i < (length - 2) && c == '%' &&
|
||||
} else if ((i + 2) < length && c == '%' &&
|
||||
EVUTIL_ISXDIGIT_(uri[i+1]) && EVUTIL_ISXDIGIT_(uri[i+2])) {
|
||||
char tmp[3];
|
||||
tmp[0] = uri[i+1];
|
||||
|
Loading…
x
Reference in New Issue
Block a user