Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/62747
to look at the new patch set (#2).
Change subject: flashrom.c, sfdp.c: Initialize dynamically allocated memory using calloc ......................................................................
flashrom.c, sfdp.c: Initialize dynamically allocated memory using calloc
In flashrom_image_write variables curcontents and oldcontents are dynamically allocated using malloc. These could remain uninitialized and when later used in need_erase could result in undefined behaviour. Similiar reasoning for variables hbuf, hdrs, tbuf in function prob_spi_sfdp. So allocate them using calloc to initialize them to zeroes or if allocating using malloc separately initialize them using a loop.
Change-Id: I6b9269129968fb3b55b0d2a2e384c8a1aeba43ab Signed-off-by: Aarya Chaumal aarya.chaumal@gmail.com --- M flashrom.c M sfdp.c M writeprotect_ranges.c 3 files changed, 5 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/47/62747/2