Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 24 Aug 2017 14:47:04 +0200
From: Shiz <hi@...z.me>
To: musl@...ts.openwall.com
Subject: Re: gethostbyname2.c /
 6476b8135760659b25c93ff9308425ca98a9e777 breaking asterisk 13 compatibility


>> 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

Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists

Your e-mail address:

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