mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix bug #73150: missing NULL check in dom_document_save_html
(cherry picked from commit 1c0e9126fb
)
This commit is contained in:
parent
4d11a8eedf
commit
d1e878f272
1 changed files with 2 additions and 2 deletions
|
@ -1663,7 +1663,7 @@ PHP_FUNCTION(dom_document_savexml)
|
|||
if (options & LIBXML_SAVE_NOEMPTYTAG) {
|
||||
xmlSaveNoEmptyTags = saveempty;
|
||||
}
|
||||
if (!size) {
|
||||
if (!size || !mem) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
RETVAL_STRINGL((char *) mem, size);
|
||||
|
@ -2215,7 +2215,7 @@ PHP_FUNCTION(dom_document_save_html)
|
|||
#else
|
||||
htmlDocDumpMemory(docp, &mem, &size);
|
||||
#endif
|
||||
if (!size) {
|
||||
if (!size || !mem) {
|
||||
RETVAL_FALSE;
|
||||
} else {
|
||||
RETVAL_STRINGL((const char*) mem, size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue