Skip to content

Commit 478a520

Browse files
committed
Fix incorrect OpenSSL merge
1 parent a22eb4d commit 478a520

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/openssl/openssl_backend_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1886,7 +1886,7 @@ PHP_OPENSSL_API zend_string* php_openssl_encrypt(
18861886
if (mode.is_aead && tag) {
18871887
zend_string *tag_str = zend_string_alloc(tag_len, 0);
18881888

1889-
if (EVP_CIPHER_CTX_ctrl(cipher_ctx, mode.aead_get_tag_flag, tag_len, ZSTR_VAL(tag_str)) <= 0) {
1889+
if (EVP_CIPHER_CTX_ctrl(cipher_ctx, mode.aead_get_tag_flag, tag_len, ZSTR_VAL(tag_str)) > 0) {
18901890
ZSTR_VAL(tag_str)[tag_len] = '\0';
18911891
ZSTR_LEN(tag_str) = tag_len;
18921892
ZEND_TRY_ASSIGN_REF_NEW_STR(tag, tag_str);

0 commit comments

Comments
 (0)