Attention is currently required from: David Hendricks, Edward O'Callaghan, Angel Pons.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/70006 )
Change subject: layout: Check return values for strdup in register_include_arg ......................................................................
Patch Set 6:
(4 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/70006/comment/c413b325_39b4026a PS5, Line 9: strdup return values should be checked for NULL to catch the : potential error case of out of memory.
This patch does more than this. […]
First of all, good point about what the patch is doing: indeed, so I updated commit message.
Secondly, about splitting into two: I would definitely do the part of "extracting code into static functions" as a separate patch. Can we have this one as first, and extracting code into functions as a second?
I did the part of "refactor the inadequate error handling of ternary operators acting on heap allocating functions" in this patch, since that was immediate concern described in the ticket.
Overall, patch looks better than it was in the previous version, thank you for ideas!
File layout.c:
https://review.coreboot.org/c/flashrom/+/70006/comment/304b54ea_52658a1c PS5, Line 134: colon - arg
`if (colon && !colon[1]) {` is no longer checked before this operation.
Done
https://review.coreboot.org/c/flashrom/+/70006/comment/6ac2c2db_439b2783 PS5, Line 136: Could not allocate memory
CB:69472
Done
https://review.coreboot.org/c/flashrom/+/70006/comment/4a1ad134_288dab2b PS5, Line 149: Could not allocate memory\
CB:69472
Done