udhcpd host name issue

Denys Vlasenko vda.linux at googlemail.com
Wed Apr 1 19:38:17 UTC 2009


On Wed, Apr 1, 2009 at 12:17 PM, Mahavir Jain <mahavir.coep at gmail.com> wrote:
>> patching file networking/udhcp/serverpacket.c
>> Hunk #1 FAILED at 104.
>> Hunk #2 succeeded at 146 (offset -3 lines).
>> Hunk #3 succeeded at 207 with fuzz 2 (offset -1 lines).
>> Hunk #4 FAILED at 239.
>> 2 out of 4 hunks FAILED -- saving rejects to file networking/udhcp/serverpacket.c.rej
>
> I made patch against busybox-1.13.3.tar.bz2 , please make sure you are
> patching to same version.

But you don't want it to be applied to 1.13.3, you want it to be applied
to current development tree, right? If yes, then you need
to produce a patch against *that* tree.

busybox.net explains how to check out latest svn tree.

>> +                       hostname_length = *(host_name - 1);
>> +                       memcpy(oldest->hostname, host_name, hostname_length);
>> +               }
>> +               else
>> +               {
>> +                       oldest->hostname[0] = '\0';
>> +               }
>>
>> and if hostname_length happens to become > 30, memcpy will corrupt memory
>> past the end of the oldest->hostname.
>>
> Yes , this should be taken care. Either char array size can be
> increased ..or any better suggestion....?

How about truncating the hostname? You can't show
arbitrarily long hostnames anyway
(without breaking column width).

--
vda


More information about the busybox mailing list