[patch] fix wget crash when given a numeric url

Vitaly Magerya vmagerya at gmail.com
Tue Mar 22 17:55:07 UTC 2011


Hi, folks. I'm having a problem with busybox on FreeBSD: it segfaults
when I run something like this:

    $ busybox wget http://1.2.3.4

The reason for this is line 288 of ibbb/xconnect.c: result is freed
there, but if the address is numeric, it will contain NULL, hence
the segfault.

In short, the trivial fix is attached (if the attachment doesn't
get through, it simply prefixes the freeaddinfo call with a
conditional on result).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-libbb-xconnect.c
Type: text/x-csrc
Size: 290 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20110322/edbf2782/attachment.c>


More information about the busybox mailing list