diff options
author | Rob Richards <rrichards@php.net> | 2009-01-26 19:10:53 +0000 |
---|---|---|
committer | Rob Richards <rrichards@php.net> | 2009-01-26 19:10:53 +0000 |
commit | cbdb8f6167bbf99d3de58e61ebfadeadd4592d4d (patch) | |
tree | 73935dedc57dca182dda582e1705ed54355a6125 /ext/dom/document.c | |
parent | 51f4e5efcd6253a867a5e16cf472bce7fb1cefda (diff) | |
download | php-git-cbdb8f6167bbf99d3de58e61ebfadeadd4592d4d.tar.gz |
MFH: fix bug #47220 (segfault in dom_document_parser in recovery mode)
Diffstat (limited to 'ext/dom/document.c')
-rw-r--r-- | ext/dom/document.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c index 933ea76a4f..bdb58497b9 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1625,7 +1625,7 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int optio 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 { |