log: Fix incorect range check in log_get_cat_name()
authorSimon Glass <sjg@chromium.org>
Tue, 12 Jun 2018 06:04:55 +0000 (00:04 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 18 Jun 2018 18:43:14 +0000 (14:43 -0400)
commitc2e4e7e6316a1683be56618a5918732477742fbc
treea448e550dc9b28dd0a8aac68ab274f345d955a58
parentb4c3fb087b06ec56cc325e2e73f8f497be89d129
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>
common/log.c
include/log.h