summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-05-12 12:03:00 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-05-12 12:03:00 +0200
commitb47d95286bd78282c57fdc200f81d17b187a45dd (patch)
tree089225dcd49f95ed4e433ba62ed5e0e5ea8944aa /plugins
parent547e50c9fc9e009c54c5aa021ca9d9a8399d744a (diff)
downloadrsyslog-b47d95286bd78282c57fdc200f81d17b187a45dd.tar.gz
rsyslog-b47d95286bd78282c57fdc200f81d17b187a45dd.tar.xz
rsyslog-b47d95286bd78282c57fdc200f81d17b187a45dd.zip
bugfix: potential segfault issue when multiple $UDPServerRun directives are specified.
Thanks to Michael Biebl for helping to debug this one.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/imudp/imudp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c
index e9e82b20..79d51263 100644
--- a/plugins/imudp/imudp.c
+++ b/plugins/imudp/imudp.c
@@ -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