non-busybox dhcp clients (was: PATCH: ifupdown.c, udhcpc, and standalone shell)
Gabriel L. Somlo
somlo at cmu.edu
Thu Oct 12 01:28:41 UTC 2006
On Thu, Oct 12, 2006 at 12:16:43AM +0200, Denis Vlasenko wrote:
>
> + char *path = xstrdup(getenv("PATH"));
>
> What if getenv returns NULL?
>
Looked at xstrdup (in xfuncs.c), and xstrdup returns NULL if passed a
NULL argument. So path will be NULL if getenv returns NULL.
> + if (path)
> + free(path);
>
> path is always !NULL.
Not always :) It's NULL if getenv returned null.
> Applied. Please test svn version.
I checked out svn 16367, and which.c and ifupdown.c are fixed, but
execable.c isn't anywhere to be found (i.e., not under ./libbb/). The
declarations are in ./include/libbb.h, though...
Thanks,
Gabriel
More information about the busybox
mailing list