mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 07:56:12 +03:00
fix: makes uri decode platform independent
This commit is contained in:
parent
5b094c0ce9
commit
fcf205d599
@ -99,8 +99,8 @@ std::string uri_decode(const std::string & sSrc) {
|
|||||||
while (pSrc < SRC_LAST_DEC) {
|
while (pSrc < SRC_LAST_DEC) {
|
||||||
if (*pSrc == '%') {
|
if (*pSrc == '%') {
|
||||||
char dec1, dec2;
|
char dec1, dec2;
|
||||||
if (-1 != (dec1 = string::HEX2DEC[*(pSrc + 1)])
|
if ((char)-1 != (dec1 = string::HEX2DEC[*(pSrc + 1)])
|
||||||
&& -1 != (dec2 = string::HEX2DEC[*(pSrc + 2)])) {
|
&& (char)-1 != (dec2 = string::HEX2DEC[*(pSrc + 2)])) {
|
||||||
*pEnd++ = (dec1 << 4) + dec2;
|
*pEnd++ = (dec1 << 4) + dec2;
|
||||||
pSrc += 3;
|
pSrc += 3;
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user