Home GnuPG

Fix parsing DNs that end with a hex string

Description

Fix parsing DNs that end with a hex string

* src/dn.cpp (parse_dn_part): Handle case that stringv ends with hex
string.
* tests/t-dn.cpp (TestDistinguishedNameParser::testParser_data): Add
test with DN ending with hex string.

Calling remove_prefix with n > size() (e.g. n == npos) is UB.

Details

Provenance
ikloeckerAuthored on Sat, Jul 12, 11:10 PM
Parents
rGPGMEQTdcec6832e81b: Fix typo in outputIsBase64Encoded
Branches
Unknown
Tags
Unknown
References
HEAD -> master