mailing list of musl libc
 help / color / mirror / code / Atom feed
From: 周欣潼 <zxt@bcsner.com>
To: musl <musl@lists.openwall.com>
Subject: freeaddrinfo() behavior change in 1.1.21: crash on NULL
Date: Tue, 26 Mar 2019 20:13:40 +0800	[thread overview]
Message-ID: <tencent_1DA3CDA03F071806366D8F67@qq.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 716 bytes --]

Hi,


We were testing connman with musl 1.1.21and hit this issue. The behavior change was introduced in http://git.musl-libc.org/cgit/musl/commit/?id=d1395c43c019aec6b855cf3c656bf47c8a719e7f. Before the change, freeaddrinfo() accepts NULL since it just calls free(). Now it expects the input pointer to be valid.


I am writing to check whether this is expected. connman calls freeaddrinfo() regard less of the return code of getaddrinfo() and crashes when getaddrinfo() fails. The document of freeaddrinfo() does not explicitly state its behavior on NULL, but the wording seems to indicate the argument should be valid. If this interpretation is correct, we can proceed to patch connman.


Thanks,
Xintong

[-- Attachment #2: Type: text/html, Size: 880 bytes --]

             reply	other threads:[~2019-03-26 12:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-26 12:13 周欣潼 [this message]
2019-03-26 15:11 ` Rich Felker

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=tencent_1DA3CDA03F071806366D8F67@qq.com \
    --to=zxt@bcsner.com \
    --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).