
12 Oct
2020
12 Oct
'20
5:35 a.m.
On Sat, 10 Oct 2020 at 13:43, Sean Anderson seanga2@gmail.com wrote:
Without every category between LOGC_NONE and LOGC_COUNT present in log_cat_name, log_get_cat_by_name will dereference NULL pointers if it doesn't find a name early enough.
Fixes: c3aed5db59 ("sandbox: spi: Add more logging") Fixes: a5c13b68e7 ("sandbox: log: Add a category for sandbox") Fixes: 9f407d4ef0 ("Add core support for a bloblist to convey data from SPL") Fixes: cce61fc428 ("dm: devres: Convert to use logging") Fixes: 7ca2850cbc ("dm: core: Add basic ACPI support")
Signed-off-by: Sean Anderson seanga2@gmail.com
Changes in v2:
- Add compiletime assert on size of log_cat_name
common/log.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org