[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
correctness of libares patch
From: |
Morten Poulsen |
Subject: |
correctness of libares patch |
Date: |
03 Dec 2002 15:16:07 +0100 |
Hi,
I was reading the libares-patch at
http://hurd.dyndns.org/patches/libares.patch yesterday, and found some
code I think is incorrect. One of the lines goes like this
hostname = (char*)realloc(hostname,sizeof(hostname)*2);
The idea - i think - is to realloc() twice the space previously
allocated. Does that work? Isn't sizeof(hostname) always sizeof(char *)
no matter how much allocated space it points to?
I've made a new version of the patch at
http://www.afdelingp.dk/files/patch-libares-1.1.1.diff - I hope it's
useful.
Happy hacking,
Morten
--
Morten Poulsen <morten-hurdNOSPAM@afdelingp.dk>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- correctness of libares patch,
Morten Poulsen <=