aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Simons <jon@jonsimons.org>2018-05-10 16:46:57 -0400
committerAndreas Schneider <asn@cryptomilk.org>2018-06-28 09:06:30 +0200
commitf827833d822d1bff4cdfd28c91a1c026fe46b1ce (patch)
tree2ac3b1ada5414320a1cacb9878da0182b21f06ee
parent6f38e0b771b4b888eec15d29f0d8ec6c83bbb3d1 (diff)
downloadlibssh-f827833d822d1bff4cdfd28c91a1c026fe46b1ce.tar.gz
libssh-f827833d822d1bff4cdfd28c91a1c026fe46b1ce.tar.xz
libssh-f827833d822d1bff4cdfd28c91a1c026fe46b1ce.zip
tests: fix torture_packet.c `test_data`
Make the `test_data` larger so that tests do not read beyond its length. Observed in testing with an `-fsanitize=address` build locally. Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--tests/unittests/torture_packet.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unittests/torture_packet.c b/tests/unittests/torture_packet.c
index a01ea218..729aaccd 100644
--- a/tests/unittests/torture_packet.c
+++ b/tests/unittests/torture_packet.c
@@ -13,7 +13,10 @@
#include <sys/socket.h>
#include "socket.c"
-uint8_t test_data[]="AThis is test data. Use it to check the validity of packet functions";
+uint8_t test_data[]="AThis is test data. Use it to check the validity of packet functions"
+ "AThis is test data. Use it to check the validity of packet functions"
+ "AThis is test data. Use it to check the validity of packet functions"
+ "AThis is test data. Use it to check the validity of packet functions";
uint8_t key[]="iekaeshoa7ooCie2shai8shahngee3ONsee3xoishooj0ojei6aeChieth1iraPh";
uint8_t iv[]="eixaxughoomah4ui7Aew3ohxuolaifuu";
uint8_t mac[]="thook2Jai0ahmahyae7ChuuruoPhee8Y";