diff options
author | David Benjamin <davidben@google.com> | 2022-10-25 16:29:43 -0400 |
---|---|---|
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-11-14 21:01:23 +0000 |
commit | a1dffbfed9b78d77ab17c15fe2d189ca44704fd8 (patch) | |
tree | a44e5e4238e973725574a7abacf1ebb7f46d209b /fuzz | |
parent | 7ac94aa279bac74c3e486fce091e1f7a38577e68 (diff) | |
download | boringssl-a1dffbfed9b78d77ab17c15fe2d189ca44704fd8.zip boringssl-a1dffbfed9b78d77ab17c15fe2d189ca44704fd8.tar.gz boringssl-a1dffbfed9b78d77ab17c15fe2d189ca44704fd8.tar.bz2 |
Define CBS/CBB tags as uint32_t with a typedef.
We use unsigned, but we actually assume it is 32-bit for the bit-packing
strategy. But also introduce a typedef to hint that callers shouldn't
treat it as an arbitrary 32-bit integer. A typedef would also allow us
to extend to uint64_t in the future, if we ever need to.
Update-Note: Some APIs switch from unsigned * to uint32_t * out
pointers. This is only source-compatible if unsigned and uint32_t are
the exact same type. The CQ suggests this is indeed true. If they are
not, replace unsigned with CBS_ASN1_TAG to fix the build.
Bug: 525
Change-Id: I45cbe127c1aa252f5f6a169dca2e44d1e6e1d669
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/54986
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
Diffstat (limited to 'fuzz')
-rw-r--r-- | fuzz/der_roundtrip.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fuzz/der_roundtrip.cc b/fuzz/der_roundtrip.cc index b88a7d6..03fa4c3 100644 --- a/fuzz/der_roundtrip.cc +++ b/fuzz/der_roundtrip.cc @@ -22,7 +22,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) { CBS cbs, body; - unsigned tag; + CBS_ASN1_TAG tag; CBS_init(&cbs, buf, len); if (CBS_get_any_asn1(&cbs, &body, &tag)) { // DER has a unique encoding, so any parsed input should round-trip |