From: W.C.A. Wijngaards Date: Wed, 3 Jun 2026 12:21:06 +0000 (+0200) Subject: * Fix to parse SVCB and HTTPS svcparam ech=0. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a65a37415379727a2f7435d4a22e6b63cf04e1ad;p=thirdparty%2Fldns.git * Fix to parse SVCB and HTTPS svcparam ech=0. --- diff --git a/Changelog b/Changelog index b32d92ac..841052c2 100644 --- a/Changelog +++ b/Changelog @@ -8,6 +8,7 @@ presentation format in ldns_pkt2str_fmt. Thanks Peter Kästle * The -O option to calculate (and sign) only the ZONEMD an input zone with ldns-signzone + * Fix to parse SVCB and HTTPS svcparam ech=0. 1.9.0 2025-12-04 * PR #246: Make ldns_calc_keytag() available for CDNSKEY RR diff --git a/str2host.c b/str2host.c index 8a325921..f497bd8b 100644 --- a/str2host.c +++ b/str2host.c @@ -2153,6 +2153,11 @@ parse_svcparam_ech(const char **s, uint8_t **dp, uint8_t *eod) *s += 1; quoted = true; } + if(**s == '0' && *(*s+1) == 0) { + /* single 0 represents empty buffer */ + *s += 1; + return LDNS_STATUS_OK; + } b64_str = *s; while (isalnum((unsigned char)**s) || **s == '+' || **s == '/'