summaryrefslogtreecommitdiffstats
path: root/runtime/objomsr.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-04-13 12:09:36 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-04-13 12:09:36 +0200
commit4f043bcd3575d4e61015240cbea6fdfb92c9e4f8 (patch)
tree0d49bb314c7015cf5c911b373f7694b5179580d2 /runtime/objomsr.c
parent2ab2eeafa838de7053e626a6610e775232dc67b9 (diff)
downloadrsyslog-4f043bcd3575d4e61015240cbea6fdfb92c9e4f8.tar.gz
rsyslog-4f043bcd3575d4e61015240cbea6fdfb92c9e4f8.tar.xz
rsyslog-4f043bcd3575d4e61015240cbea6fdfb92c9e4f8.zip
permitting plugins to use three string requests
Diffstat (limited to 'runtime/objomsr.c')
-rw-r--r--runtime/objomsr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/objomsr.c b/runtime/objomsr.c
index a1dad1c8..7241fa27 100644
--- a/runtime/objomsr.c
+++ b/runtime/objomsr.c
@@ -60,11 +60,14 @@ rsRetVal OMSRdestruct(omodStringRequest_t *pThis)
*/
rsRetVal OMSRconstruct(omodStringRequest_t **ppThis, int iNumEntries)
{
- omodStringRequest_t *pThis;
+ omodStringRequest_t *pThis = NULL;
DEFiRet;
assert(ppThis != NULL);
assert(iNumEntries >= 0);
+ if(iNumEntries > CONF_OMOD_NUMSTRINGS_MAXSIZE) {
+ ABORT_FINALIZE(RS_RET_MAX_OMSR_REACHED);
+ }
CHKmalloc(pThis = calloc(1, sizeof(omodStringRequest_t)));
/* got the structure, so fill it */