diff options
author | lordjaxom <lordjaxom> | 2005-01-02 20:33:53 +0000 |
---|---|---|
committer | lordjaxom <lordjaxom> | 2005-01-02 20:33:53 +0000 |
commit | fa55bc1472723964810dbc3d35cd9bc0c0c64947 (patch) | |
tree | 8441f499387527bf10ad0aae8f5b981a3f705476 /xml | |
parent | 02e605fe54e3d625e64495be3c497844c34ef3d2 (diff) | |
download | vdr-plugin-text2skin-fa55bc1472723964810dbc3d35cd9bc0c0c64947.tar.gz vdr-plugin-text2skin-fa55bc1472723964810dbc3d35cd9bc0c0c64947.tar.bz2 |
- added a check in case parameter count overflows
Diffstat (limited to 'xml')
-rw-r--r-- | xml/function.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xml/function.c b/xml/function.c index 5a11609..d185559 100644 --- a/xml/function.c +++ b/xml/function.c @@ -1,5 +1,5 @@ /* - * $Id: function.c,v 1.5 2005/01/02 20:04:09 lordjaxom Exp $ + * $Id: function.c,v 1.6 2005/01/02 20:33:53 lordjaxom Exp $ */ #include "xml/function.h" @@ -115,6 +115,12 @@ bool cxFunction::Parse(const std::string &Text) return false; } + if (mNumParams == MAXPARAMETERS) { + esyslog("ERROR: Too many parameters to function, maximum is %d", + MAXPARAMETERS); + return false; + } + mType = type; mParams[mNumParams++] = expr; last = ptr + 1; |