From 72e99519a91a12459b93a32acd295951ffa5dcc7 Mon Sep 17 00:00:00 2001 From: ihsinme <61293369+ihsinme@users.noreply.github.com> Date: Mon, 16 Nov 2020 19:04:32 +0300 Subject: [PATCH] fix access outside the array (#1119) --- src/QueryParser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/QueryParser.h b/src/QueryParser.h index 457bd02..9c04d37 100644 --- a/src/QueryParser.h +++ b/src/QueryParser.h @@ -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? */