mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 22:25:38 +00:00
Fixed buffer overflow in HttpReq::encodeUrl.
I believe the character in the URL string was being read as a signed char instead of an unsigned char which caused weirdness with Unicode characters.
This commit is contained in:
parent
0dcfc2945d
commit
3afbc4543f
|
@ -22,7 +22,7 @@ std::string HttpReq::urlEncode(const std::string &s)
|
||||||
{
|
{
|
||||||
escaped.append("%");
|
escaped.append("%");
|
||||||
char buf[3];
|
char buf[3];
|
||||||
sprintf(buf, "%.2X", s[i]);
|
sprintf(buf, "%.2X", (unsigned char)s[i]);
|
||||||
escaped.append(buf);
|
escaped.append(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue