From: Ryan Fairfax Date: Thu, 7 Mar 2019 21:20:54 +0000 (-0800) Subject: handle labels with 8-bit byte values in dn_skipname X-Git-Tag: v1.1.22~36 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2a0ff45b362b7f0f89374ba7240c469d9ea53562;p=oweals%2Fmusl.git handle labels with 8-bit byte values in dn_skipname The original logic considered each byte until it either found a 0 value or a value >= 192. This means if a string segment contained any byte >= 192 it was interepretted as a compressed segment marker even if it wasn't in a position where it should be interpretted as such. The fix is to adjust dn_skipname to increment by each segments size rather than look at each character. This avoids misinterpretting string segment characters by not considering those bytes. --- diff --git a/src/network/dn_skipname.c b/src/network/dn_skipname.c index d54c2e5d..eba65bb8 100644 --- a/src/network/dn_skipname.c +++ b/src/network/dn_skipname.c @@ -2,11 +2,14 @@ int dn_skipname(const unsigned char *s, const unsigned char *end) { - const unsigned char *p; - for (p=s; p=192) if (p+1