fix access outside the array (#1119)

This commit is contained in:
ihsinme
2020-11-16 19:04:32 +03:00
committed by GitHub
parent 2d65df86c7
commit 72e99519a9
+1 -1
View File
@@ -59,7 +59,7 @@ namespace uWS {
int out = 0;
/* Walk over all chars until end or null char, decoding in place */
for (int i = 0; in[i] && i < statementValue.length(); i++) {
for (int i = 0; i < statementValue.length() && in[i]; i++) {
/* Only bother with '%' */
if (in[i] == '%') {
/* Do we have enough data for two bytes hex? */