mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Markus Wichmann <nullplan@gmx.net>
To: musl@lists.openwall.com
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: Re: [musl] [Bug?] getaddrinfo() fills .ai_canonname when AI_CANONNAME isn't passed
Date: Sat, 27 Jan 2024 18:05:24 +0100	[thread overview]
Message-ID: <ZbU31OS3omM1BkMN@voyager> (raw)
In-Reply-To: <2ee42b57d19761973d1bd12e529a97cc00d829f3.camel@gentoo.org>

Hi,

I just had a look at the POSIX specification again and noticed that it
doesn't breathe a word about the setting of .ai_canonname in case
AI_CANONNAME is not set. Nor does it say anything about .ai_canonname in
any returned structure other than the first. The case is entirely
unspecified.

Therefore your application must not make assumptions about it in that
case. The test is wrong to assume anything about .ai_canonname if
AI_CANONNAME is not set.

Ciao,
Markus

      reply	other threads:[~2024-01-27 17:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-27 15:03 Michał Górny
2024-01-27 17:05 ` Markus Wichmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZbU31OS3omM1BkMN@voyager \
    --to=nullplan@gmx.net \
    --cc=mgorny@gentoo.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).