Blob Blame History Raw
From bcf39c1828399ebc33fb92c4edaf2bdd5f891a58 Mon Sep 17 00:00:00 2001
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
Date: Fri, 5 Jul 2019 15:49:37 +0000
Subject: [PATCH] Additional overflow test.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1127 6239d852-aaf2-0410-a92c-79f79f948069
Petr Písař: Ported to 10.33.

Signed-off-by: Petr Písař <ppisar@redhat.com>
---
 testdata/testinput2  | 4 ++++
 testdata/testoutput2 | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/testdata/testinput2 b/testdata/testinput2
index 079d6d8..9412bf6 100644
--- a/testdata/testinput2
+++ b/testdata/testinput2
@@ -5591,6 +5591,10 @@ a)"xI
 
 /\[()]{65535}(?<A>)/expand
 
+# Addition overflow
 /( {32742} {42})(?<!\1{65481})/
 
+# Multiplication overflow
+/(X{65535})(?<=\1{32770})/
+
 # End of testinput2
diff --git a/testdata/testoutput2 b/testdata/testoutput2
index bfe61a3..950095f 100644
--- a/testdata/testoutput2
+++ b/testdata/testoutput2
@@ -16940,9 +16940,14 @@ Failed: error 197 at offset 131071: too many capturing groups (maximum 65535)
 /\[()]{65535}(?<A>)/expand
 Failed: error 197 at offset 131075: too many capturing groups (maximum 65535)
 
+# Addition overflow
 /( {32742} {42})(?<!\1{65481})/
 Failed: error 187 at offset 15: lookbehind assertion is too long
 
+# Multiplication overflow
+/(X{65535})(?<=\1{32770})/
+Failed: error 187 at offset 10: lookbehind assertion is too long
+
 # End of testinput2
 Error -70: PCRE2_ERROR_BADDATA (unknown error number)
 Error -62: bad serialized data
-- 
2.20.1