diff options
author | Stanislav Malyshev <stas@php.net> | 2011-11-18 07:11:19 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2011-11-18 07:11:19 +0000 |
commit | 9a69efb9fc302c5e4c672f27a2f7c558db80152a (patch) | |
tree | 8a6a5a943677a1bbafe5efb1565ce9e0f737003b | |
parent | 89104021b76c25489914c906ed8b996ec0522a9a (diff) | |
download | php-git-9a69efb9fc302c5e4c672f27a2f7c558db80152a.tar.gz |
fixes for bug #55748
-rw-r--r-- | Zend/zend_builtin_functions.c | 3 | ||||
-rw-r--r-- | ext/com_dotnet/com_typeinfo.c | 4 | ||||
-rw-r--r-- | ext/oci8/oci8.c | 3 | ||||
-rw-r--r-- | ext/standard/syslog.c | 3 |
4 files changed, 13 insertions, 0 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index aeacda54e2..e4d6303839 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -706,6 +706,9 @@ repeat: } c.flags = case_sensitive; /* non persistent */ c.name = IS_INTERNED(name) ? name : zend_strndup(name, name_len); + if(name == NULL) { + RETURN_FALSE; + } c.name_len = name_len+1; c.module_number = PHP_USER_CONSTANT; if (zend_register_constant(&c TSRMLS_CC) == SUCCESS) { diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c index e2d5d28af5..2934c05933 100644 --- a/ext/com_dotnet/com_typeinfo.c +++ b/ext/com_dotnet/com_typeinfo.c @@ -187,6 +187,10 @@ PHPAPI int php_com_import_typelib(ITypeLib *TL, int mode, int codepage TSRMLS_DC const_name = php_com_olestring_to_string(bstr_ids, &c.name_len, codepage TSRMLS_CC); c.name = zend_strndup(const_name, c.name_len); efree(const_name); + if(c.name == NULL) { + ITypeInfo_ReleaseVarDesc(TypeInfo, pVarDesc); + continue; + } c.name_len++; /* include NUL */ SysFreeString(bstr_ids); diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 809ff816ae..2b63a6faf5 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -2055,6 +2055,9 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char } else { connection = (php_oci_connection *) calloc(1, sizeof(php_oci_connection)); connection->hash_key = zend_strndup(hashed_details.c, hashed_details.len); + if(connection->hash_key == NULL) { + return NULL; + } connection->is_persistent = 1; } } else { diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c index 2abef47859..cc49cc5f4a 100644 --- a/ext/standard/syslog.c +++ b/ext/standard/syslog.c @@ -146,6 +146,9 @@ PHP_FUNCTION(openlog) free(BG(syslog_device)); } BG(syslog_device) = zend_strndup(ident, ident_len); + if(BG(syslog_device) == NULL) { + RETURN_FALSE; + } openlog(BG(syslog_device), option, facility); RETURN_TRUE; } |