Skip to content

Commit 91f3a42

Browse files
author
Sebastiano Merlino
committed
fit \0 in strings in http_utils_test
1 parent d68e99e commit 91f3a42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/unit/http_utils_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ LT_BEGIN_SUITE(http_utils_suite)
3636
LT_END_SUITE(http_utils_suite)
3737

3838
LT_BEGIN_AUTO_TEST(http_utils_suite, unescape)
39-
char* string_with_plus = (char*) malloc(5 * sizeof(char));
39+
char* string_with_plus = (char*) malloc(6 * sizeof(char));
4040
sprintf(string_with_plus, "%s", "A%20B");
4141
int expected_size = http::http_unescape(string_with_plus);
4242

43-
char* expected = (char*) malloc(3 * sizeof(char));
43+
char* expected = (char*) malloc(4 * sizeof(char));
4444
sprintf(expected, "%s", "A B");
4545

4646
LT_CHECK_EQ(string(string_with_plus), string(expected));

0 commit comments

Comments
 (0)