Fix potential out-of-bounds access
Thanks to Beosin(https://github.com/Lianantech)
This commit is contained in:
parent
ad3c881aa2
commit
1d028b3c15
1 changed files with 1 additions and 1 deletions
|
|
@ -185,7 +185,7 @@ std::vector<header> parse_urlencoded_params( const std::string& f ) {
|
|||
std::vector<header> h(num_args);
|
||||
int arg = 0;
|
||||
for( size_t i = 0; i < f.size(); ++i ) {
|
||||
while( f[i] != '=' && i < f.size() ) {
|
||||
while( i < f.size() && f[i] != '=' ) {
|
||||
if( f[i] == '%' ) {
|
||||
h[arg].key += char((fc::from_hex(f[i+1]) << 4) | fc::from_hex(f[i+2]));
|
||||
i += 3;
|
||||
|
|
|
|||
Loading…
Reference in a new issue