diff options
author | Benjamin Kaduk <bkaduk@akamai.com> | 2021-02-24 13:38:25 -0800 |
---|---|---|
committer | Benjamin Kaduk <bkaduk@akamai.com> | 2021-02-26 15:43:20 -0800 |
commit | a88ea7dfdfba2c34bd575076f12f06d80dd2c0c2 (patch) | |
tree | 583c3eec14a70206031ac4b1fc88cca7494c507a /.github | |
parent | 3a6e6b1f94ae41e2fd73483464c9c80ddcf30d17 (diff) |
Check ASN1_item_ndef_i2d() return value.
Return an error instead of trying to malloc a negative number.
The other usage in this file already had a similar check, and the caller
should have put an entry on the error stack already.
Note that we only check the initial calls to obtain the encoded length,
and assume that the follow-up call to actually encode to the allocated
storage will succeed if the first one did.
Fixes: #14177
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14308)
(cherry picked from commit 90b4247cc5dca58cee9da5f6975bb38fd200100a)
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions