diff options
Diffstat (limited to 'ext/openssl/tests/bug74099.phpt')
-rw-r--r-- | ext/openssl/tests/bug74099.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/openssl/tests/bug74099.phpt b/ext/openssl/tests/bug74099.phpt new file mode 100644 index 0000000000..c0e02ba0cc --- /dev/null +++ b/ext/openssl/tests/bug74099.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #74099 Memory leak with openssl_encrypt() +--SKIPIF-- +<?php +if (!extension_loaded("openssl")) die("skip"); +?> +--FILE-- +<?php +$aad = random_bytes(32); +$iv = random_bytes(16); +$key = random_bytes(32); + +$plaintext = ''; +$tag = null; + +$ciphertext = openssl_encrypt($plaintext, 'aes-256-gcm', $key, \OPENSSL_RAW_DATA, $iv, $tag, $aad); +var_dump($ciphertext); +?> +--EXPECTF-- +string(0) "" |