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:39:56 +0000 (14:39 +0100)
commita04d08fc18e3dba21dfce71e55f0decb971f9b91
treed25ce818d9de6ece851bb80977ee84eca0337840
parent1ee454157636a69400af56ea19f57c0b05c344ef
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