From 5e89041a61974cb3b5fff60400001add33f8a507 Mon Sep 17 00:00:00 2001 From: Yevgeny Pats Date: Mon, 8 Jul 2019 11:34:07 +0300 Subject: [PATCH] fix --- src/test_string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test_string.cpp b/src/test_string.cpp index e71cfb2..4fe74bf 100644 --- a/src/test_string.cpp +++ b/src/test_string.cpp @@ -12,7 +12,7 @@ int test_string(const char *src, size_t len) } else { if (strncmp(src, FLAG, strlen(FLAG)) == 0) { // TRIGGER HEAP OVERFLOW READ - if (src[len] == 0) { + if (src[len-1] == 0) { return -2; } return -1;