Busybox 1.16.x dnsd alignment problems

Denys Vlasenko vda.linux at googlemail.com
Tue Apr 20 20:25:27 UTC 2010


On Sat, Apr 17, 2010 at 7:46 AM, Lars Reemts <lars at reemts.de> wrote:
>> Does it work if you add PACKED here in dnsd.c?
>
>> struct type_and_class {
>>         uint16_t type PACKED;
>>         uint16_t class PACKED;
>> };
>
> No, but it does work with:
> struct type_and_class {
>        uint16_t type;
>        uint16_t class;
> }PACKED;
>
> Then the disassembler also shows some calls to memcpy with a length of 2.

http://busybox.net/downloads/fixes-1.16.1/busybox-1.16.1-dnsd.patch

Let me know whether this patch fixes all your problems.
-- 
vda


More information about the busybox mailing list