Closed obgm closed 2 years ago
I would prefer to have PRs against "main". Only if the review needs to be postponed, I would cherry-pick them on develop and mark that with a label in the PR.
What's about using "main" instead of "develop"?
if the last changes are put in a PR against main, the LGTM and we can merge them fast into main.
Sure, will do.
For ASN.1 integers greater than 128 (i.e., with the most significant bit set) the encoded length might exceed data_len. The length check in the while loop must be done after decrementing data_len.
This PR addresses a bug reported by Shisong Qin, cf. #133
The function can be tested like this:
Compile with
The erroneous function would cause the sanitizer to report a stack-buffer-overflow (see below) while staying silent for the fixed version.