]> granicus.if.org Git - php/commitdiff
Fixed a small memory leak when a NULL variable is passed to
authorIlia Alshanetsky <iliaa@php.net>
Thu, 2 Jan 2003 21:18:59 +0000 (21:18 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 2 Jan 2003 21:18:59 +0000 (21:18 +0000)
openssl_csr_sign() as the first argument.

ext/openssl/openssl.c

index 3c0a4bb59ae969540a338ae7ab8d3b6fb07d5d57..377191a2c9d531de98c59631496af8194a0fe31c 100644 (file)
@@ -1310,8 +1310,9 @@ static X509_REQ * php_openssl_csr_from_zval(zval ** val, int makeresource, long
                        return (X509_REQ*)what;
                }
                return NULL;
+       } else if (Z_TYPE_PP(val) != IS_STRING) {
+               return NULL;
        }
-       convert_to_string_ex(val);
 
        if (Z_STRLEN_PP(val) > 7 && memcmp(Z_STRVAL_PP(val), "file://", 7) == 0)
                filename = Z_STRVAL_PP(val) + 7;