@@ -1842,11 +1842,11 @@ PHP_FUNCTION(sodium_crypto_aead_aes256gcm_decrypt)
1842
1842
RETURN_THROWS ();
1843
1843
}
1844
1844
msg_len = ciphertext_len ;
1845
- if (msg_len > = SIZE_MAX ) {
1845
+ if (msg_len = = SIZE_MAX ) {
1846
1846
zend_throw_exception (sodium_exception_ce , "arithmetic overflow" , 0 );
1847
1847
RETURN_THROWS ();
1848
1848
}
1849
- msg = zend_string_alloc (( size_t ) msg_len , 0 );
1849
+ msg = zend_string_alloc (msg_len , 0 );
1850
1850
if (crypto_aead_aes256gcm_decrypt
1851
1851
((unsigned char * ) ZSTR_VAL (msg ), & msg_real_len , NULL ,
1852
1852
ciphertext , (unsigned long long ) ciphertext_len ,
@@ -1957,11 +1957,11 @@ PHP_FUNCTION(sodium_crypto_aead_aegis128l_decrypt)
1957
1957
RETURN_FALSE ;
1958
1958
}
1959
1959
msg_len = ciphertext_len ;
1960
- if (msg_len > = SIZE_MAX ) {
1960
+ if (msg_len = = SIZE_MAX ) {
1961
1961
zend_throw_exception (sodium_exception_ce , "arithmetic overflow" , 0 );
1962
1962
RETURN_THROWS ();
1963
1963
}
1964
- msg = zend_string_alloc (( size_t ) msg_len , 0 );
1964
+ msg = zend_string_alloc (msg_len , 0 );
1965
1965
if (crypto_aead_aegis128l_decrypt
1966
1966
((unsigned char * ) ZSTR_VAL (msg ), & msg_real_len , NULL ,
1967
1967
ciphertext , (unsigned long long ) ciphertext_len ,
0 commit comments