diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-04-13 12:09:36 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-04-13 12:09:36 +0200 |
commit | 4f043bcd3575d4e61015240cbea6fdfb92c9e4f8 (patch) | |
tree | 0d49bb314c7015cf5c911b373f7694b5179580d2 /runtime/objomsr.c | |
parent | 2ab2eeafa838de7053e626a6610e775232dc67b9 (diff) | |
download | rsyslog-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.c | 5 |
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 */ |