bugfix: potential segfault issue when multiple $UDPServerRun directives are specified.

Thanks to Michael Biebl for helping to debug this one.
This commit is contained in:
Rainer Gerhards 2009-05-12 12:03:00 +02:00
parent 547e50c9fc
commit b47d95286b
2 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,8 @@
Version 3.22.1 [v3-stable] (rgerhards), 2009-04-??
- bugfix: light and full delay watermarks had invalid values, badly
affecting performance for delayable inputs
- bugfix: potential segfault issue when multiple $UDPServerRun directives
are specified. Thanks to Michael Biebl for helping to debug this one.
---------------------------------------------------------------------------
Version 3.22.0 [v3-stable] (rgerhards), 2009-04-21
This is the first stable release that includes the full functionality

View File

@ -101,7 +101,7 @@ static rsRetVal addListner(void __attribute__((unused)) *pVal, uchar *pNewVal)
udpLstnSocks = newSocks;
} else {
/* we need to add them */
if((tmpSocks = malloc(sizeof(int) * 1 + newSocks[0] + udpLstnSocks[0])) == NULL) {
if((tmpSocks = malloc(sizeof(int) * (1 + newSocks[0] + udpLstnSocks[0]))) == NULL) {
dbgprintf("out of memory trying to allocate udp listen socket array\n");
/* in this case, we discard the new sockets but continue with what we
* already have