]> granicus.if.org Git - php/commitdiff
Add overflow check for openssl_pkcs12_read
authorJakub Zelenka <bukka@php.net>
Thu, 20 Aug 2015 18:29:54 +0000 (19:29 +0100)
committerJakub Zelenka <bukka@php.net>
Thu, 20 Aug 2015 18:29:54 +0000 (19:29 +0100)
ext/openssl/openssl.c

index 9deef36e8f54506a1dcb8708d6704597d148e3c3..7dcc16b24219963b99408a80a32e7e4336972b58 100644 (file)
@@ -2553,6 +2553,8 @@ PHP_FUNCTION(openssl_pkcs12_read)
 
        RETVAL_FALSE;
 
+       PHP_OPENSSL_CHECK_OVERFLOW(zp12_len, pkcs12);
+
        bio_in = BIO_new(BIO_s_mem());
 
        if(0 >= BIO_write(bio_in, zp12, (int)zp12_len))