aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/tests/socket_test.c
diff options
context:
space:
mode:
authorJan Hutter <jhutter@hsr.ch>2005-11-08 06:55:33 +0000
committerJan Hutter <jhutter@hsr.ch>2005-11-08 06:55:33 +0000
commit01d06501d9b15b3aab24ef3b9455dc2b8840666a (patch)
treea0ea1cfad22bd55685924836fdf913697adf7002 /Source/charon/tests/socket_test.c
parent27d2b681abfe0da14fda0934a0b9cbd04374498b (diff)
downloadstrongswan-01d06501d9b15b3aab24ef3b9455dc2b8840666a.tar.bz2
strongswan-01d06501d9b15b3aab24ef3b9455dc2b8840666a.tar.xz
- socket test fixed
Diffstat (limited to 'Source/charon/tests/socket_test.c')
-rw-r--r--Source/charon/tests/socket_test.c6
1 files changed, 3 insertions, 3 deletions
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);