summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-10-02 11:42:54 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-10-02 11:42:54 +0200
commitca7cd5ef9ce629b2de514d69ebd22b6249274edf (patch)
tree22137b72cb80bd4cc1d98370e69135b03ce4d139
parent26ab13d9763c3a9cb6beb429edb81c9774141537 (diff)
parent97d94ad9afed4da801bdb3181b9895dccdb0cbfa (diff)
downloadrsyslog-ca7cd5ef9ce629b2de514d69ebd22b6249274edf.tar.gz
rsyslog-ca7cd5ef9ce629b2de514d69ebd22b6249274edf.tar.xz
rsyslog-ca7cd5ef9ce629b2de514d69ebd22b6249274edf.zip
Merge branch 'v6-stable' into v6-devel
-rw-r--r--ChangeLog2
-rw-r--r--tests/tcpflood.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c066cb6..93df217c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -635,6 +635,8 @@ Version 5.10.1 [V5-STABLE], 2012-0?-??
Thanks to pilou@gmx.com for the bug report
- bugfix: remove invalid socket option call from imuxsock
Thanks to Cristian Ionescu-Idbohrn and Jonny Törnbom
+- bugfix: fixed wrong bufferlength for snprintf in tcpflood.c when using
+ the -f (dynafiles) option.
---------------------------------------------------------------------------
Version 5.10.0 [V5-STABLE], 2012-08-23
diff --git a/tests/tcpflood.c b/tests/tcpflood.c
index f3a89c77..8fd347f1 100644
--- a/tests/tcpflood.c
+++ b/tests/tcpflood.c
@@ -360,7 +360,7 @@ genMsg(char *buf, size_t maxBuf, int *pLenBuf, struct instdata *inst)
} while(!done); /* Attention: do..while()! */
} else if(MsgToSend == NULL) {
if(dynFileIDs > 0) {
- snprintf(dynFileIDBuf, maxBuf, "%d:", rand() % dynFileIDs);
+ snprintf(dynFileIDBuf, sizeof(dynFileIDBuf), "%d:", rand() % dynFileIDs);
}
if(extraDataLen == 0) {
*pLenBuf = snprintf(buf, maxBuf, "<%s>Mar 1 01:00:00 172.20.245.8 tag msgnum:%s%8.8d:%c",