Attention is currently required from: Aarya, Anastasia Klimchuk, Nikolai Artemiev.
Alexander Goncharov has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/81548?usp=email )
Change subject: erasure_layout: do not copy region buffers if they are null ......................................................................
Patch Set 1:
(1 comment)
File erasure_layout.c:
https://review.coreboot.org/c/flashrom/+/81548/comment/e1b115ea_fb024bc5 : PS1, Line 263: old_start_buf = (uint8_t *)malloc(old_start - region_start); : if (!old_start_buf) { : msg_cerr("Not enough memory!\n"); : ret = -1; : goto _end; : } : old_end_buf = (uint8_t *)malloc(region_end - old_end); : if (!old_end_buf) { : msg_cerr("Not enough memory!\n"); : ret = -1; : goto _end; : }
Oh I think this piece is also somewhat relevant to the patch. […]
Thanks for the details, Anastasia! Yeah, I will dive deeper to see possible solutions and understand code better. I have a few thoughts on how to rewrite it, but I need to test them.