Hi there,

the enclosed patch fixes a seg-fault in udhcpc when passing in an unknown 
DHCP-option via -O.

The patch should apply cleanly against 1.11.2 and with a little fuzz against 
1.12.0, too.

cheers,
    Oliver
--- busybox-1.11.1/networking/udhcp/dhcpc.c     2008-06-25 14:51:14.000000000 
+0200
+++ busybox-1.11.1-uclibc/networking/udhcp/dhcpc.c      2008-08-27 
22:42:20.000000000 +0200
@@ -126,7 +126,7 @@
 int udhcpc_main(int argc ATTRIBUTE_UNUSED, char **argv)
 {
        uint8_t *temp, *message;
-       char *str_c, *str_V, *str_h, *str_F, *str_r;
+       char *str_c, *str_V, *str_h, *str_F, *str_r, *curr_option;
        USE_FEATURE_UDHCP_PORT(char *str_P;)
        llist_t *list_O = NULL;
        int tryagain_timeout = 20;
@@ -259,9 +259,9 @@
        if (opt & OPT_o)
                client_config.no_default_options = 1;
        while (list_O) {
-               int n = index_in_strings(dhcp_option_strings, 
llist_pop(&list_O));
+               int n = index_in_strings(dhcp_option_strings, curr_option = 
llist_pop(&list_O));
                if (n < 0)
-                       bb_error_msg_and_die("unknown option '%s'", 
list_O->data);
+                       bb_error_msg_and_die("unknown option '%s'", 
curr_option);
                n = dhcp_options[n].code;
                client_config.opt_mask[n >> 3] |= 1 << (n & 7);
        }
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to