mirror of
https://github.com/apple/swift-asn1
synced 2026-11-22 04:10:39 +00:00
Motivation In #125 we attempted to apply a hardening fix that would avoid allowing truncation of BER content by applying an end-of-contents octets at the wrong parse depth to a higher-level object. This fix was incomplete. Modifications Re-write the code to handle the end-of-contents octets as part of the loop instead of attempting to detect it after the fact. Add defense-in-depth for unexpected nodes. Results More robust against issues with end-of-contents octets.