Attention is currently required from: Zheng Bao. Hello Zheng Bao,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/62487
to review the following change.
Change subject: amdfwtool: Make sure the level is an legal value ......................................................................
amdfwtool: Make sure the level is an legal value
Change-Id: Ie058d2ad48acbf9c3f219c472632cddceddfb825 Signed-off-by: Zheng Bao fishbaozi@gmail.com --- M util/amdfwtool/data_parse.c 1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/87/62487/1
diff --git a/util/amdfwtool/data_parse.c b/util/amdfwtool/data_parse.c index a6b73ee..b6d40ff 100644 --- a/util/amdfwtool/data_parse.c +++ b/util/amdfwtool/data_parse.c @@ -534,6 +534,10 @@ ch_lvl = oneline[match[3].rm_so + 2]; }
+ assert (ch_lvl == 'x' || ch_lvl == 'X' || + ch_lvl == 'b' || ch_lvl == 'B' || + ch_lvl == '1' || ch_lvl == '2'); + if (find_register_fw_filename_psp_dir( &(oneline[match[1].rm_so]), path_filename, ch_lvl, cb_config) == 0) {