diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-10-02 11:43:27 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-10-02 11:43:27 +0200 |
commit | 8062f67442d0740e252a92208891725ab3520f24 (patch) | |
tree | c523fa55a7540104305f3843b97b14d7c836ff4a | |
parent | 3496d1c8181b422370ebe92699adf442b144129b (diff) | |
parent | ca7cd5ef9ce629b2de514d69ebd22b6249274edf (diff) | |
download | rsyslog-8062f67442d0740e252a92208891725ab3520f24.tar.gz rsyslog-8062f67442d0740e252a92208891725ab3520f24.tar.xz rsyslog-8062f67442d0740e252a92208891725ab3520f24.zip |
Merge branch 'v6-devel'
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | tests/tcpflood.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -718,6 +718,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", |