From: Ilia Alshanetsky Date: Tue, 15 Mar 2005 00:29:39 +0000 (+0000) Subject: MFH: Fixed possible usage of str without being initialized. X-Git-Tag: php-5.0.4RC2~48 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65a055397feaaede04186088e55aa23d189e6c81;p=php MFH: Fixed possible usage of str without being initialized. --- diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 0885eeed1f..be61253c46 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -273,7 +273,9 @@ static void add_assoc_name_entry(zval * val, char * key, X509_NAME * name, int s } else { zval_dtor(subentries); FREE_ZVAL(subentries); - add_assoc_stringl(subitem, sname, str->data, str->length, 1); + if (obj_cnt) { + add_assoc_stringl(subitem, sname, str->data, str->length, 1); + } } } zend_hash_update(HASH_OF(val), key, strlen(key) + 1, (void *)&subitem, sizeof(subitem), NULL);