]> git.baikalelectronics.ru Git - uboot.git/commit
log: correct and check array size of log categories
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 23 Oct 2020 11:00:01 +0000 (13:00 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 27 Oct 2020 21:04:15 +0000 (17:04 -0400)
commit1ececb8ef0b2750df4905f7afb9ce64f9d00dde1
tree4f12560f10151c4fe5b7bb2a58e2b04bee035f45
parentaa0631213c28fa051c915e45d071ddc2fd3cc759
log: correct and check array size of log categories

The log command has led to NULL dereferences if an unknown category name
name was used due to missing entries in the list of category names.

Add compile time checks for the array sizes of log_cat_name and
log_lvl_name to avoid future mishaps.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/log.c