perl/perl-regexp-refoverflow.diff
Stephan Kulow bcc016af5d - update to perl-5.26.1
* [CVE-2017-12837] Heap buffer overflow in regular expression compiler
 * [CVE-2017-12883] Buffer over-read in regular expression parser
 * tons of bug fixes
- update list of obsoletes

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=152
2017-09-23 12:12:52 +00:00

14 lines
474 B
Diff

Index: regcomp.c
===================================================================
--- regcomp.c.orig
+++ regcomp.c
@@ -10988,7 +10988,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I
ret = reg2Lanode(pRExC_state, GOSUB, num, RExC_recurse_count);
if (!SIZE_ONLY) {
- if (num > (I32)RExC_rx->nparens) {
+ if (num < 0 || num > (I32)RExC_rx->nparens) {
RExC_parse++;
vFAIL("Reference to nonexistent group");
}