summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-03-15 00:27:52 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-03-15 00:27:52 +0000
commit8c38ac19bf11e43ab7d6e5687174f6e748b4969c (patch)
treed1bc34c084165acbe44aadb77040fc609fd08fc7
parentabb724a6b3e7c9f9d968026edd1b05309fbac413 (diff)
downloadphp-git-8c38ac19bf11e43ab7d6e5687174f6e748b4969c.tar.gz
Fixed possible usage of str without being initialized.
-rw-r--r--ext/openssl/openssl.c4
1 files changed, 3 insertions, 1 deletions
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);