[coreboot] Coreboot bug?

ron minnich rminnich at gmail.com
Thu Nov 12 00:46:26 CET 2009


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.
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?

I don't know.

Sorry for my confusion.

ron




More information about the coreboot mailing list