[libxml2] 608773 add a missing check in xmlGROW



commit 59df7834a2f54aa47010f542ddbace30e501c0a9
Author: Daniel Veillard <veillard redhat com>
Date:   Tue Feb 2 10:24:01 2010 +0100

    608773 add a missing check in xmlGROW
    
    * parser.c: check that the input buffer is non null before dereferencing it

 parser.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/parser.c b/parser.c
index a63c668..4d85966 100644
--- a/parser.c
+++ b/parser.c
@@ -1864,7 +1864,7 @@ static void xmlSHRINK (xmlParserCtxtPtr ctxt) {
 
 static void xmlGROW (xmlParserCtxtPtr ctxt) {
     xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
-    if ((*ctxt->input->cur == 0) &&
+    if ((ctxt->input->cur != NULL) && (*ctxt->input->cur == 0) &&
         (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0))
 	    xmlPopInput(ctxt);
 }



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