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;