Hi Jerry, On Tue, 12 Jan 2021 00:41:55 -0700, Jerry Hoemann wrote: > On Tue, Jan 05, 2021 at 01:56:09PM +0100, Jean Delvare wrote: > > To be on the safe side, please start with a length check as is done for > > regular DMI types (although apparently not all OEM types - will look > > into that). > > I think you mean a check like: > pr_handle_name("%s Proliant Inventory Record", > company); > if (h->length < 0x24) break; > > before decoding any fields?
Yes. > Looks like record 236 (commit d9b84ea) should have done something similar. > I'll fix record 236 as a separate patch. Thank you. > > (...) > > Could we use dmi_print_memory_size() here so that the size is > > automatically expressed in the most suitable unit? > > dmi_print_memory_size() is defined statically in dmidecode.c. > > Will make global and put prototype in dmidecode.h Sure :-) -- Jean Delvare SUSE L3 Support _______________________________________________ https://lists.nongnu.org/mailman/listinfo/dmidecode-devel