Attention is currently required from: Aarya, Alexander Goncharov, Nikolai Artemiev.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/81548?usp=email )
Change subject: erasure_layout: don't copy region buffers if they're null/zero-size ......................................................................
Patch Set 2:
(4 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/81548/comment/fd0cc90d_526bab2a : PS2, Line 10: the pointer is null I think from the meaning of the patch, you meant to say `the pointer is non-null`
File erasure_layout.c:
https://review.coreboot.org/c/flashrom/+/81548/comment/7680b945_70a9f658 : 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; : }
Sorry it took longer than I expected. […]
Great! this is what I was thinking about! I am resolving this comment. I added few more other comments though :)
File erasure_layout.c:
https://review.coreboot.org/c/flashrom/+/81548/comment/dd093a22_69ec2718 : PS2, Line 263: size_t old_start_len This can be const, but also
maybe rename it into `start_buf_len` ? I think that "old" suffix doesn't really explain anything. What do you think?
https://review.coreboot.org/c/flashrom/+/81548/comment/47062ded_d9a3f306 : PS2, Line 264: size_t old_end_len And this can be const and `end_buf_len`