[libxml2] Fix NULL pointer deref in xmlFAParseCharClassEsc
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix NULL pointer deref in xmlFAParseCharClassEsc
- Date: Tue, 4 Jul 2017 17:14:04 +0000 (UTC)
commit 8a0c66986e68c1c23fc3bb421b73465937c803b2
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Tue Jul 4 17:13:06 2017 +0200
Fix NULL pointer deref in xmlFAParseCharClassEsc
Found with libFuzzer.
xmlregexp.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/xmlregexp.c b/xmlregexp.c
index 7dc6eea..019399f 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -4881,7 +4881,8 @@ xmlFAParseCharClassEsc(xmlRegParserCtxtPtr ctxt) {
}
NEXT;
xmlFAParseCharProp(ctxt);
- ctxt->atom->neg = 1;
+ if (ctxt->atom != NULL)
+ ctxt->atom->neg = 1;
if (CUR != '}') {
ERROR("Expecting '}'");
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]