Skip to content

Commit e12b72d

Browse files
committed
Fix bug #68166
We can't always efree here php_escape_html_entities can return an interned_empty_string
1 parent 98959f6 commit e12b72d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
11571157
size_t len;
11581158
char *buf = php_escape_html_entities(buffer, buffer_len, &len, 0, ENT_COMPAT, NULL TSRMLS_CC);
11591159
php_printf("%s<br />\n<b>%s</b>: %s in <b>%s</b> on line <b>%d</b><br />\n%s", STR_PRINT(prepend_string), error_type_str, buf, error_filename, error_lineno, STR_PRINT(append_string));
1160-
efree(buf);
1160+
str_efree(buf);
11611161
} else {
11621162
php_printf("%s<br />\n<b>%s</b>: %s in <b>%s</b> on line <b>%d</b><br />\n%s", STR_PRINT(prepend_string), error_type_str, buffer, error_filename, error_lineno, STR_PRINT(append_string));
11631163
}

0 commit comments

Comments
 (0)