Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 24 Aug 2017 15:02:28 +0200
From: Pirmin Walthert <pirmin.walthert@...om.ch>
To: musl@...ts.openwall.com
Subject: Re: gethostbyname2.c /
 6476b8135760659b25c93ff9308425ca98a9e777 breaking asterisk 13 compatibility

Am Donnerstag, den 24.08.2017, 14:47 +0200 schrieb Shiz:
> > > Second: I'm currently debugging a strange memory corruption
> > > problem
> > > and
> > > have just had a look at the gethostbyname2.c code:
> > > 
> > > I was wondering: why is it safe to do free(h) on the initial run
> > > when
> > > *h has not been
> > > 
> > >        static struct hostent *h;
> > >        size_t size = 63;
> > >        struct hostent *res;
> > >        int err;
> > >        do {
> > >                free(h);
> > > 
> > > Best regards,
> > > 
> > > Pirmin
> 
> h is defined as having static storage, as such its initial
> value is NULL. free(NULL) is valid.
> 
> - Shiz

You're right, thanks for pointing that out.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.