From 5e89041a61974cb3b5fff60400001add33f8a507 Mon Sep 17 00:00:00 2001 From: Yevgeny Pats Date: Mon, 8 Jul 2019 11:34:07 +0300 Subject: [PATCH 1/2] 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; From c82994c78b0a343ece4c91192f86b0103e6a551d Mon Sep 17 00:00:00 2001 From: Yevgeny Pats Date: Mon, 8 Jul 2019 14:49:58 +0300 Subject: [PATCH 2/2] crash --- 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 4fe74bf..e71cfb2 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-1] == 0) { + if (src[len] == 0) { return -2; } return -1;