Christian Walter has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31493 )
Change subject: cbfstool: Add ifittool ......................................................................
Patch Set 12:
(9 comments)
https://review.coreboot.org/#/c/31493/12/util/cbfstool/fit.c File util/cbfstool/fit.c:
https://review.coreboot.org/#/c/31493/12/util/cbfstool/fit.c@205 PS12, Line 205: /* Check that the address field has the proper signature. */ null pointer?
https://review.coreboot.org/#/c/31493/12/util/cbfstool/fit.c@234 PS12, Line 234: fit->header.checksum = 0; null pointer?
https://review.coreboot.org/#/c/31493/12/util/cbfstool/fit.c@254 PS12, Line 254: bgets(buf, &file->magic, sizeof(file->magic)); null pointer?
https://review.coreboot.org/#/c/31493/12/util/cbfstool/fit.c@295 PS12, Line 295: mcus = malloc(sizeof(*mcus) * max_fit_entries); I always think it's bad practice to malloc something within a function and free it somewhere else. You could easliy resolve this by allocating this prior calling this function and handling it into it as a pointer.
https://review.coreboot.org/#/c/31493/12/util/cbfstool/fit.c@366 PS12, Line 366: entry->address = acm_addr; null pointer?
https://review.coreboot.org/#/c/31493/12/util/cbfstool/fit.c@388 PS12, Line 388: entry->address = sm_addr; null pointer?
https://review.coreboot.org/#/c/31493/12/util/cbfstool/fit.c@417 PS12, Line 417: { null pointer?
https://review.coreboot.org/#/c/31493/12/util/cbfstool/fit.c@431 PS12, Line 431: entry->address = txt_policy_addr; null pointer?
https://review.coreboot.org/#/c/31493/12/util/cbfstool/fit.c@650 PS12, Line 650: struct fit_entry *entry; null pointer?