From 01d06501d9b15b3aab24ef3b9455dc2b8840666a Mon Sep 17 00:00:00 2001 From: Jan Hutter Date: Tue, 8 Nov 2005 06:55:33 +0000 Subject: - socket test fixed --- Source/charon/tests/socket_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/charon/tests/socket_test.c') diff --git a/Source/charon/tests/socket_test.c b/Source/charon/tests/socket_test.c index 4e761496b..a8ced751d 100644 --- a/Source/charon/tests/socket_test.c +++ b/Source/charon/tests/socket_test.c @@ -39,9 +39,9 @@ void test_socket(tester_t *tester) char *test_string = "Testing functionality of socket_t"; - pkt->data.ptr = alloc_bytes(strlen(test_string),"test_string"); - memcpy(pkt->data.ptr,test_string,strlen(test_string)); - pkt->data.len = strlen(test_string); + pkt->data.ptr = alloc_bytes(strlen(test_string) + 1,"test_string"); + memcpy(pkt->data.ptr,test_string,strlen(test_string) + 1); + pkt->data.len = strlen(test_string) + 1; /* send to previously bound socket */ pkt->set_destination(pkt, "127.0.0.1", 4500); -- cgit v1.2.3