43 lines
1.6 KiB
Diff
43 lines
1.6 KiB
Diff
|
diff -urN lksctp-tools-1.0.5.orig/src/apps/sctp_test.c lksctp-tools-1.0.5/src/apps/sctp_test.c
|
||
|
--- lksctp-tools-1.0.5.orig/src/apps/sctp_test.c 2006-01-04 14:06:22.000000000 -0500
|
||
|
+++ lksctp-tools-1.0.5/src/apps/sctp_test.c 2006-01-24 01:13:09.000000000 -0500
|
||
|
@@ -72,7 +72,7 @@
|
||
|
#define REPEAT 10
|
||
|
#define BIG_REPEAT 1000000
|
||
|
#define MAX_BIND_RETRYS 10
|
||
|
-#define BODYSIZE 10
|
||
|
+#define BODYSIZE 11
|
||
|
#define MSG_CNT 10 /* If this is changed the msg_sizes array
|
||
|
needs to be modified accordingly. */
|
||
|
|
||
|
@@ -325,7 +325,7 @@
|
||
|
DEBUG_PRINT(DEBUG_MIN, "Data %d bytes.", msg_len);
|
||
|
|
||
|
DEBUG_PRINT(DEBUG_MAX, " First %d bytes: ",
|
||
|
- (msg_len < BODYSIZE)?msg_len:BODYSIZE);
|
||
|
+ (msg_len < (BODYSIZE - 1))?msg_len:(BODYSIZE - 1));
|
||
|
/* Make sure that everything is printable and that we
|
||
|
* are NUL terminated...
|
||
|
*/
|
||
|
@@ -355,7 +355,7 @@
|
||
|
if (!isprint(text[i])) text[i] = '.';
|
||
|
}
|
||
|
|
||
|
- strncpy(tmptext, text, BODYSIZE);
|
||
|
+ strncpy(tmptext, text, (BODYSIZE - 1));
|
||
|
tmptext[BODYSIZE-1] = '\0';
|
||
|
|
||
|
DEBUG_PRINT(DEBUG_MAX, "%s", tmptext);
|
||
|
diff -urN lksctp-tools-1.0.5.orig/src/func_tests/test_basic.c lksctp-tools-1.0.5/src/func_tests/test_basic.c
|
||
|
--- lksctp-tools-1.0.5.orig/src/func_tests/test_basic.c 2006-01-04 14:06:22.000000000 -0500
|
||
|
+++ lksctp-tools-1.0.5/src/func_tests/test_basic.c 2006-01-24 01:14:09.000000000 -0500
|
||
|
@@ -82,7 +82,7 @@
|
||
|
int pf_class;
|
||
|
uint32_t ppid;
|
||
|
uint32_t stream;
|
||
|
- sctp_assoc_t associd1, associd2;
|
||
|
+ sctp_assoc_t associd1 = NULL, associd2;
|
||
|
struct sctp_assoc_change *sac;
|
||
|
char *big_buffer;
|
||
|
struct sockaddr *laddrs, *paddrs;
|