rrichards               Mon Jan 26 19:11:20 2009 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/dom    document.c 
  Log:
  MFH: 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.68.2.3.2.10&r2=1.68.2.3.2.11&diff_format=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.68.2.3.2.10 
php-src/ext/dom/document.c:1.68.2.3.2.11
--- php-src/ext/dom/document.c:1.68.2.3.2.10    Wed Dec 31 11:17:37 2008
+++ php-src/ext/dom/document.c  Mon Jan 26 19:11:19 2009
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: document.c,v 1.68.2.3.2.10 2008/12/31 11:17:37 sebastian Exp $ */
+/* $Id: document.c,v 1.68.2.3.2.11 2009/01/26 19:11:19 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1687,7 +1687,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