Attention is currently required from: Zheng Bao.

Bao Zheng would like Zheng Bao to review this change.

View Change

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) {

To view, visit change 62487. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie058d2ad48acbf9c3f219c472632cddceddfb825
Gerrit-Change-Number: 62487
Gerrit-PatchSet: 1
Gerrit-Owner: Bao Zheng <fishbaozi@gmail.com>
Gerrit-Reviewer: Zheng Bao
Gerrit-Attention: Zheng Bao
Gerrit-MessageType: newchange