Attention is currently required from: Nico Huber, Angel Pons, Anastasia Klimchuk. Miklós Márton has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/56637 )
Change subject: ni845x_spi: Fix signed - unsigned comparisons ......................................................................
Patch Set 3:
(5 comments)
File ni845x_spi.c:
https://review.coreboot.org/c/flashrom/+/56637/comment/9f31cd3a_30b28bd7 PS1, Line 188: strtol
+1
Done
https://review.coreboot.org/c/flashrom/+/56637/comment/453d7f54_d7742601 PS1, Line 483: const
Unrelated change?
Yepp, submitting it an another PR.
https://review.coreboot.org/c/flashrom/+/56637/comment/f9d763d1_59860a5f PS1, Line 556: CS_number = CS_str[0] - '0';
Interesting, thank you very much!
Done
https://review.coreboot.org/c/flashrom/+/56637/comment/6ebc5c05_4a3db031 PS1, Line 558: strlen(CS_str)
Note that the alternative approach proposed below avoids the use-after-free bug.
Done
https://review.coreboot.org/c/flashrom/+/56637/comment/562322e8_be858425 PS1, Line 556: CS_number = CS_str[0] - '0'; : free(CS_str); : if (strlen(CS_str) > 1 || 7 < CS_number) { : msg_perr("Only CS 0-7 supported\n"); : return 1; : }
It's simpler, sounds good.
Done