mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
log: Fix incorect range check in log_get_cat_name()
This allows access to an element after the end of the array. Fix it. Reported-by: Coverity (CID: 173279) Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -274,7 +274,8 @@ struct log_filter {
|
||||
* log_get_cat_name() - Get the name of a category
|
||||
*
|
||||
* @cat: Category to look up
|
||||
* @return category name (which may be a uclass driver name)
|
||||
* @return category name (which may be a uclass driver name) if found, or
|
||||
* "<invalid>" if invalid, or "<missing>" if not found
|
||||
*/
|
||||
const char *log_get_cat_name(enum log_category_t cat);
|
||||
|
||||
|
Reference in New Issue
Block a user