fix out-of-bounds write in sm2_crypt.c
authorymlbright <yml_bright@163.com>
Wed, 22 Aug 2018 03:22:11 +0000 (11:22 +0800)
committerPauli <paul.dale@oracle.com>
Wed, 29 Aug 2018 03:47:14 +0000 (13:47 +1000)
commit307a494e5b01ff9f334a8242d31b8254c7c54baa
tree8a841594478f976170e6439857ce4f4ee1085dde
parent7d38ca3f8bca58bf7b69e78c1f1ab69e5f429dff
fix out-of-bounds write in sm2_crypt.c

asn1_encode has two form length octets: short form(1 byte), long form(1+n byte).

CLA: Trivial

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7027)
crypto/sm2/sm2_crypt.c