{
struct cb_mainboard *mb = (struct cb_mainboard *)ptr;
- strncpy(cb_info.vendor, cb_mb_vendor_part(mb), 31);
- strncpy(cb_info.part, cb_mb_part_string(mb), 31);
+ strncpy(cb_info.vendor, cb_mb_vendor_part(mb), sizeof(cb_info.vendor) - 1);
+ strncpy(cb_info.part, cb_mb_part_string(mb), sizeof(cb_info.part) - 1);
}
static void parse_strings(unsigned char *ptr)