Skip to content

impi_fru.c with multi change to 0xFF #334

Open
howardliu1223 opened this issue Mar 15, 2022 · 1 comment
Open

impi_fru.c with multi change to 0xFF #334

howardliu1223 opened this issue Mar 15, 2022 · 1 comment

Comments

@howardliu1223
Copy link

Dear Sir,

There is a problem in ipmi_fru.c.

Line 5081~Line5084
if ((f_type == 'c' ) || (f_type == 'b' ) || (f_type == 'p' )) {
printf("Change multi offset from %d to %d\n", header.offset.multi, header.offset.multi + change_size_by_8);
header.offset.multi += change_size_by_8;
}

if header.offset.multi = 0 and chagne_size_by_8 = -1, header.offset.multi will be 0xff.
Check 0, no change?

Thanks.

@AlexanderAmelkin
Copy link
Contributor

The problem is actually much deeper. The code assumes that there is a specific order of sections, which is not necessarily true.
The code must be substantially refactored to account for arbitrary order of sections. It's not just checking for 0. The same issue exists above for board and product areas.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants