Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: "André Draszik" <git@andred.net>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] connman: fix segfault with musl >2.21
Date: Thu, 23 May 2019 18:31:04 +0300	[thread overview]
Message-ID: <20190523153104.GA3348@localhost> (raw)
In-Reply-To: <33eea54007fc51700266a93daf84496a5fd405fb.camel@andred.net>

On Thu, May 23, 2019 at 02:56:11PM +0100, André Draszik wrote:
>...
> Also, in connman's gweb.c 'addr' is initialised to NULL. Again,
> NULL isn't anything 'returned by getaddrinfo()', so even in glibc
> it only works by pure luck.
>...

Not pure luck, free(NULL) is valid but passing random garbage to 
freeaddrinfo() would always fail.[1]

The critical point is that freeaddrinfo(NULL) working with a C library
is only an implementation detail of this specific version of the library,
not something a C library has to support according to POSIX.

> Cheers,
> Andre'

cu
Adrian

[1] unless the garbage happens to be NULL

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



  reply	other threads:[~2019-05-23 15:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23  7:47 [PATCH] connman: fix segfault with musl >2.21 Nicola Lunghi
2019-05-23  9:17 ` André Draszik
2019-05-23 11:06   ` nick83ola
2019-05-23 12:05     ` Burton, Ross
2019-05-23 13:56     ` André Draszik
2019-05-23 15:31       ` Adrian Bunk [this message]
2019-05-23 10:17 ` André Draszik

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=20190523153104.GA3348@localhost \
    --to=bunk@stusta.de \
    --cc=git@andred.net \
    --cc=openembedded-core@lists.openembedded.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox