prelude-lml/master: Warn the user in case the PCRE vector is too small
[email protected] Thu, 16 Jul 2009 15:42:30 +0200 (CEST)
| Newsgroups | gmane.comp.security.ids.prelude.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 03a37dd9e4f2e28481ed8835ba63eef575ff8a03 Author: Yoann Vandoorselaere <[email protected]> Date: Thu Jul 16 15:14:40 2009 +0200 Warn the user in case the PCRE vector is too small ======================================== plugins/pcre/rule-regex.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) ======================================== diff --git a/plugins/pcre/rule-regex.c b/plugins/pcre/rule-regex.c index bfcf0be..9fcee64 100644 --- a/plugins/pcre/rule-regex.c +++ b/plugins/pcre/rule-regex.c @@ -109,6 +109,10 @@ static int do_pcre_exec(rule_regex_t *item, const char *in, size_t len, int *omi optr[1] = obkp1; ovector_index += (item->capture_count * 2); + if ( ovector_index > OVECSIZE ) { + prelude_log(PRELUDE_LOG_ERR, "backward references vector is too small: %u entry required.\n", ovector_index); + return -1; + } return ret; } _______________________________________________ Prelude-cvslog site list [email protected] http://lists.prelude-ids.org/mailman/listinfo/prelude-cvslog