rrichards               Mon Jan 26 19:10:10 2009 UTC

  Modified files:              
    /php-src/ext/dom    document.c 
  Log:
  fix bug #47220 (segfault in dom_document_parser in recovery mode)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/document.c?r1=1.99&r2=1.100&diff_format=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.99 php-src/ext/dom/document.c:1.100
--- php-src/ext/dom/document.c:1.99     Wed Dec 31 11:12:30 2008
+++ php-src/ext/dom/document.c  Mon Jan 26 19:10:09 2009
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: document.c,v 1.99 2008/12/31 11:12:30 sebastian Exp $ */
+/* $Id: document.c,v 1.100 2009/01/26 19:10:09 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1627,7 +1627,7 @@
                        EG(error_reporting) = old_error_reporting;
                }
                /* If loading from memory, set the base reference uri for the 
document */
-               if (ret->URL == NULL && ctxt->directory != NULL) {
+               if (ret && ret->URL == NULL && ctxt->directory != NULL) {
                        ret->URL = xmlStrdup(ctxt->directory);
                }
        } else {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to