Bug in DOM document.c php_dom_ctx_error_level()
| From: | Adam Maccabee Trachtenberg | Date: | Mon, 01 Dec 2003 08:10:16 +0000 |
| Subject: | Bug in DOM document.c php_dom_ctx_error_level() | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-5852@lists.php.net to get a copy of this message | ||
The php_dom_ctx_error_level() function in DOM document.c assumes that
input->filename is always non-null. This is not true when the file is
an entity.
You can trigger this by killing your Internet connection and then
loading any XML file that references an external entity. For example:
<!ENTITY % HTMLlat1 PUBLIC
"-//W3C//ENTITIES Latin 1 for XHTML//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
%HTMLlat1;
]>
A patch to fix this is available at:
http://www.trachtenberg.com/patches/php_dom_ctx_error_level.txt
-adam
--
adam@trachtenberg.com