Skip to content

Commit

Permalink
Fix segfault with strlen for aad in stream cipher
Browse files Browse the repository at this point in the history
  • Loading branch information
bukka committed Aug 6, 2014
1 parent eb9a08f commit 129ca34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto_stream.c
Expand Up @@ -385,7 +385,7 @@ static int php_crypto_stream_set_cipher(php_crypto_stream_data *data, zval **ppz
/* additional authentication data */
if (ppz_aad) {
aad = (unsigned char *) Z_STRVAL_PP(ppz_aad);
aad_len = Z_STRLEN_PP(ppz_tag);
aad_len = Z_STRLEN_PP(ppz_aad);
} else {
aad = NULL;
aad_len = 0;
Expand Down

0 comments on commit 129ca34

Please sign in to comment.