diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2012-10-30 16:34:17 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2012-10-30 16:34:17 +0000 |
commit | 4fd578d0b721e7267bbfad4dd97652687d643d09 (patch) | |
tree | ec2de1708eabf653f80ff90ce44dc1870237ab1e /pcre_dfa_exec.c | |
parent | f8accb600710dd0aa53136ab60afd94db501f89d (diff) | |
download | pcre-4fd578d0b721e7267bbfad4dd97652687d643d09.tar.gz |
Add PCRE_ERROR_BADLENGTH for a negative length.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1189 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_dfa_exec.c')
-rw-r--r-- | pcre_dfa_exec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pcre_dfa_exec.c b/pcre_dfa_exec.c index 34790f0..91c0702 100644 --- a/pcre_dfa_exec.c +++ b/pcre_dfa_exec.c @@ -3122,6 +3122,7 @@ if (re == NULL || subject == NULL || workspace == NULL || (offsets == NULL && offsetcount > 0)) return PCRE_ERROR_NULL; if (offsetcount < 0) return PCRE_ERROR_BADCOUNT; if (wscount < 20) return PCRE_ERROR_DFA_WSSIZE; +if (length < 0) return PCRE_ERROR_BADLENGTH; if (start_offset < 0 || start_offset > length) return PCRE_ERROR_BADOFFSET; /* Check that the first field in the block is the magic number. If it is not, |