[coreboot] Coreboot bug?

Myles Watson mylesgw at gmail.com
Thu Nov 12 00:57:43 CET 2009


On Wed, Nov 11, 2009 at 4:46 PM, ron minnich <rminnich at gmail.com> wrote:
> On Wed, Nov 11, 2009 at 3:37 PM, Peter Stuge <peter at stuge.se> wrote:
>> ron minnich wrote:
>>> >>> -             memcpy(rec_dest,  rec_src, rec_src->size);
>>> >>> +             memcpy(rec_dest,  &option_table, sizeof(option_table));
>>>
>>> completely changes the behavior of the code and is wrong.
>>>
>>> I'm willing to be convinced. But sizeof(option_table) is 8
>>
>> How can that be?
>>
>> option_table is the long unsigned char [] = { ... } in the source.
>
> you're right, I'm asleep.
You're fine.  It didn't work for me as I'd expected.

> we were using the size in here:
>
> struct lb_record {
>       uint32_t tag;           /* tag ID */
>       uint32_t size;          /* size of record (in bytes) */
> };
>
> is this size the size of the data inclusize of the header or not?
Yes.  It is inclusive.

Thanks,
Myles




More information about the coreboot mailing list