Rewrite i2c_ASN1_INTEGER() using CBB/CBS.
authorjsing <jsing@openbsd.org>
Sat, 20 Aug 2022 18:17:33 +0000 (18:17 +0000)
committerjsing <jsing@openbsd.org>
Sat, 20 Aug 2022 18:17:33 +0000 (18:17 +0000)
commit564d066592a8e8901e5212a438f778dfd9d8a7f5
tree7e42fb14673e6e8225e7059741096f7a756f6d0e
parent0407cd7c56b59085abc3cfdac1915ff58387c4bd
Rewrite i2c_ASN1_INTEGER() using CBB/CBS.

This gives us cleaner and safer code, although it is worth noting that we
now generate the encoding even when called with NULL as the output pointer
(and then discard it, returning just the length).

Resolves oss-fuzz #49963.

ok tb@
lib/libcrypto/asn1/a_int.c