View | Details | Raw Unified | Return to bug 23609 | Differences between
and this patch

Collapse All | Expand All

(-)a/ChangeLog (+6 lines)
Lines 1-3 Link Here
1
2018-09-05  Paul Eggert  <eggert@cs.ucla.edu>
2
3
	regex: fix storage-exhaustion error
4
	* posix/regexec.c (get_subexp):
5
	Do not continue if storage is exhausted.
6
1
2018-09-05  Assaf Gordon  <assafgordon@gmail.com>
7
2018-09-05  Assaf Gordon  <assafgordon@gmail.com>
2
8
3
	regex: fix heap-use-after-free error
9
	regex: fix heap-use-after-free error
(-)a/posix/regexec.c (-1 / +2 lines)
Lines 2780-2785 get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) Link Here
2780
	  buf = (const char *) re_string_get_buffer (&mctx->input);
2780
	  buf = (const char *) re_string_get_buffer (&mctx->input);
2781
	  if (err == REG_NOMATCH)
2781
	  if (err == REG_NOMATCH)
2782
	    continue;
2782
	    continue;
2783
	  if (BE (err != REG_NOERROR, 0))
2784
	    return err;
2783
	}
2785
	}
2784
    }
2786
    }
2785
  return REG_NOERROR;
2787
  return REG_NOERROR;
2786
- 

Return to bug 23609