summaryrefslogtreecommitdiff
path: root/src/exit
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2022-09-19 15:38:00 -0400
committerRich Felker <dalias@aerifal.cx>2022-09-19 15:38:00 -0400
commit001c1afb0a08912a6fdc7c462c53e221de4bc9f1 (patch)
tree735127f2997fc2366965cc0540033377d5bce6ec /src/exit
parent3ad3fa962efee12067d68c3405a537dce156a7ac (diff)
downloadmusl-001c1afb0a08912a6fdc7c462c53e221de4bc9f1.tar.gz
musl-001c1afb0a08912a6fdc7c462c53e221de4bc9f1.tar.bz2
musl-001c1afb0a08912a6fdc7c462c53e221de4bc9f1.tar.xz
musl-001c1afb0a08912a6fdc7c462c53e221de4bc9f1.zip
res_mkquery: error out on consecutive final dots in name
the main loop already errors out on zero-length labels within the name, but terminates before having a chance to check for an erroneous final zero-length label, instead producing a malformed query packet with a '.' byte instead of the terminating zero. rather than poke at the look logic, simply detect this condition early and error out without doing anything. this also fixes behavior of getaddrinfo when "." appears in the search domain list, which produces a name ending in ".." after concatenation, at least in the sense of no longer emitting malformed packets on the network. however, due to other issues, the lookup will still fail.
Diffstat (limited to 'src/exit')
0 files changed, 0 insertions, 0 deletions