Fix a NULL dereference in chacha20_poly1305_init_key()
authorKazuki Yamaguchi <k@rhe.jp>
Tue, 10 May 2016 10:46:08 +0000 (19:46 +0900)
committerRichard Levitte <levitte@openssl.org>
Wed, 18 May 2016 09:08:55 +0000 (11:08 +0200)
commitd2dfd4820bf03b958bc9c3adafe0d3f112e54b2a
tree198395600c2857b2b1687a8187876079aa912ae4
parentb6cff313cbb1d0381b329fe4f6a8f009cdb270e4
Fix a NULL dereference in chacha20_poly1305_init_key()

chacha20_poly1305_init_key() dereferences NULL when called with inkey !=
NULL && iv == NULL. This function is called by EVP_EncryptInit_ex()
family, whose documentation allows setting key and iv in separate calls.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/evp/e_chacha20_poly1305.c