aboutsummaryrefslogtreecommitdiff
path: root/Converter/src/test.c
diff options
context:
space:
mode:
authordx <aryadevchavali1@gmail.com>2020-05-07 01:26:16 +0100
committerdx <aryadevchavali1@gmail.com>2020-05-07 01:26:16 +0100
commit80c5f9a8129f5a151770b0979b9e39777cffb9f6 (patch)
treec4ae85a81514d15b91c5a5bcdfa0a4ae3c9fec41 /Converter/src/test.c
parente0072175f5195088542b6080ec55102ecbaa1b05 (diff)
downloadmdhtml-80c5f9a8129f5a151770b0979b9e39777cffb9f6.tar.gz
mdhtml-80c5f9a8129f5a151770b0979b9e39777cffb9f6.tar.bz2
mdhtml-80c5f9a8129f5a151770b0979b9e39777cffb9f6.zip
+!fix buffer overflow; causes removal of end tag
Diffstat (limited to 'Converter/src/test.c')
-rw-r--r--Converter/src/test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Converter/src/test.c b/Converter/src/test.c
index d254194..508a9f6 100644
--- a/Converter/src/test.c
+++ b/Converter/src/test.c
@@ -17,7 +17,7 @@ void test_compile_line_header_depth(void)
const string expected_result = expected_results[i];
const int length_of_test = strnlen(test_string, 512);
const int length_of_expected = strnlen(expected_result, 512);
- const string test_result = compile_line(test_string, length_of_test + 1, "<test>");
+ const string test_result = compile_line(test_string, length_of_test, "<test>");
fprintf(stderr, "Testing %s => %s\n", test_string, expected_result);
fprintf(stderr, "Result: %s\n\n", test_result);