mirror of
https://github.com/php/php-src.git
synced 2024-09-24 11:27:28 +00:00
MFH: check filter and class names for empty strings
This commit is contained in:
parent
a39201675f
commit
14b168fcab
@ -549,6 +549,16 @@ PHP_FUNCTION(stream_filter_register)
|
||||
|
||||
RETVAL_FALSE;
|
||||
|
||||
if (!filtername_len) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Filter name cannot be empty");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!classname_len) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Class name cannot be empty");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!BG(user_filter_map)) {
|
||||
BG(user_filter_map) = (HashTable*) emalloc(sizeof(HashTable));
|
||||
zend_hash_init(BG(user_filter_map), 5, NULL, (dtor_func_t) filter_item_dtor, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user