[libxml2] Fix null deref in xmlregexp error path



commit 09797c139e5b0168c87f41b2cea1078d7244638d
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Tue Mar 5 15:14:34 2019 +0100

    Fix null deref in xmlregexp error path
    
    Thanks to Shaobo He for the report.

 xmlregexp.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/xmlregexp.c b/xmlregexp.c
index d255fbf0..9e9c3752 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -5537,6 +5537,8 @@ xmlRegexpIsDeterminist(xmlRegexpPtr comp) {
        return(comp->determinist);
 
     am = xmlNewAutomata();
+    if (am == NULL)
+        return(-1);
     if (am->states != NULL) {
        int i;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]