mirror of
https://github.com/CrowCpp/Crow.git
synced 2024-06-07 21:10:44 +00:00
Fixed issue where an index in qs_parse is incorrectly incremented beyond the maximum possible value
This commit is contained in:
parent
75c522f4f5
commit
79eec91f00
@ -119,11 +119,10 @@ inline int qs_parse(char* qs, char* qs_kv[], int qs_kv_size, bool parse_url = tr
|
|||||||
{
|
{
|
||||||
qs_kv[i] = substr_ptr;
|
qs_kv[i] = substr_ptr;
|
||||||
j = strcspn(substr_ptr, "&");
|
j = strcspn(substr_ptr, "&");
|
||||||
if ( substr_ptr[j] == '\0' ) { break; }
|
if ( substr_ptr[j] == '\0' ) { i++; break; } // x &'s -> means x iterations of this loop -> means *x+1* k/v pairs
|
||||||
substr_ptr += j + 1;
|
substr_ptr += j + 1;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
i++; // x &'s -> means x iterations of this loop -> means *x+1* k/v pairs
|
|
||||||
|
|
||||||
// we only decode the values in place, the keys could have '='s in them
|
// we only decode the values in place, the keys could have '='s in them
|
||||||
// which will hose our ability to distinguish keys from values later
|
// which will hose our ability to distinguish keys from values later
|
||||||
|
Loading…
Reference in New Issue
Block a user