Revision: 1514
http://vcs.pcre.org/viewvc?view=rev&revision=1514
Author: ph10
Date: 2015-02-03 14:34:44 +0000 (Tue, 03 Feb 2015)
Log Message:
-----------
Crash in pcretest after bad input.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/configure.ac
code/trunk/pcretest.c
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2014-11-19 20:57:13 UTC (rev 1513)
+++ code/trunk/ChangeLog 2015-02-03 14:34:44 UTC (rev 1514)
@@ -13,6 +13,9 @@
2. If an assertion condition was quantified with a minimum of zero (an odd
thing to do, but it happened), SIGSEGV or other misbehaviour could occur.
+
+3. If a pattern in pcretest input had the P (POSIX) modifier followed by an
+ unrecognized modifier, a crash could occur.
Modified: code/trunk/configure.ac
===================================================================
--- code/trunk/configure.ac 2014-11-19 20:57:13 UTC (rev 1513)
+++ code/trunk/configure.ac 2015-02-03 14:34:44 UTC (rev 1514)
@@ -9,9 +9,9 @@
dnl be defined as -RC2, for example. For real releases, it should be empty.
m4_define(pcre_major, [8])
-m4_define(pcre_minor, [36])
-m4_define(pcre_prerelease, [])
-m4_define(pcre_date, [2014-09-26])
+m4_define(pcre_minor, [37])
+m4_define(pcre_prerelease, [-RC1])
+m4_define(pcre_date, [2015-02-03])
# NOTE: The CMakeLists.txt file searches for the above variables in the first
# 50 lines of this file. Please update that if the variables above are moved.
Modified: code/trunk/pcretest.c
===================================================================
--- code/trunk/pcretest.c 2014-11-19 20:57:13 UTC (rev 1513)
+++ code/trunk/pcretest.c 2015-02-03 14:34:44 UTC (rev 1514)
@@ -3906,6 +3906,7 @@
default:
fprintf(outfile, "** Unknown modifier '%c'\n", pp[-1]);
+ do_posix = 0;
goto SKIP_DATA;
}
}
@@ -5635,7 +5636,7 @@
} /* End of loop for data lines */
CONTINUE:
-
+
#if !defined NOPOSIX
if (posix || do_posix) regfree(&preg);
#endif