Fix error paths in ASN1_TIME_to_generalizedtime
authorMatt Caswell <matt@openssl.org>
Tue, 21 Mar 2017 09:07:17 +0000 (09:07 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 21 Mar 2017 14:07:50 +0000 (14:07 +0000)
commitffcdb0e6efb6fb7033b2cd29e8cca2e2fe355c14
tree9946c26ab1d20658a4739f380f040f6dfe90f595
parent3f640ebd035006d44d6f7d0767bb6ebd1a2efcd5
Fix error paths in ASN1_TIME_to_generalizedtime

We should not write to |out| in error cases, so we should defer doing this
until the "done" block.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3002)
crypto/asn1/a_time.c