]> granicus.if.org Git - php/commitdiff
MFH: Fixed possible usage of str without being initialized.
authorIlia Alshanetsky <iliaa@php.net>
Tue, 15 Mar 2005 00:30:05 +0000 (00:30 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 15 Mar 2005 00:30:05 +0000 (00:30 +0000)
ext/openssl/openssl.c

index a4ab883c0b670362904102424f758eb167bc80e5..9637b40766a77e0530bbb88b1c3fcbab4609d46d 100644 (file)
@@ -254,7 +254,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);