Ensure we check i2d_X509 return val
authorMatt Caswell <matt@openssl.org>
Mon, 25 Apr 2016 15:05:55 +0000 (16:05 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 26 Apr 2016 13:32:45 +0000 (14:32 +0100)
commit8f43c80bfac15544820739bf035df946eeb603e8
tree2f9056518d7e48e380c8cc2f2f477ab259bec7c6
parent0ca67644ddedfd656d43a6639d89a6236ff64652
Ensure we check i2d_X509 return val

The i2d_X509() function can return a negative value on error. Therefore
we should make sure we check it.

Issue reported by Yuan Jochen Kang.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit 446ba8de9af9aa4fa3debc7c76a38f4efed47a62)
crypto/asn1/x_x509.c
ssl/ssl_cert.c