From a800b7e058b09031aba92949eecf2c76fa030635 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Thu, 4 May 2023 12:47:00 +0200 Subject: regexp: Fix null deref in xmlFAFinishReduceEpsilonTransitions Short-lived regression found by OSS-Fuzz. --- xmlregexp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xmlregexp.c b/xmlregexp.c index 3fb7e0cf..a572cf8c 100644 --- a/xmlregexp.c +++ b/xmlregexp.c @@ -1871,6 +1871,8 @@ xmlFAFinishReduceEpsilonTransitions(xmlRegParserCtxtPtr ctxt, int tonr) { xmlRegStatePtr to; to = ctxt->states[tonr]; + if (to == NULL) + return; if ((to->mark == XML_REGEXP_MARK_START) || (to->mark == XML_REGEXP_MARK_NORMAL)) return; -- cgit v1.2.1