summaryrefslogtreecommitdiffstats
path: root/runtime/objomsr.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/objomsr.c')
-rw-r--r--runtime/objomsr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/objomsr.c b/runtime/objomsr.c
index 1ac45e86..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 */
@@ -94,7 +97,6 @@ finalize_it:
rsRetVal OMSRsetEntry(omodStringRequest_t *pThis, int iEntry, uchar *pTplName, int iTplOpts)
{
assert(pThis != NULL);
- assert(pTplName != NULL);
assert(iEntry < pThis->iNumEntries);
if(pThis->ppTplName[iEntry] != NULL)