summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-07-21 08:00:35 +0200
committerHarald Welte <laforge@gnumonks.org>2019-07-21 08:01:09 +0200
commit4b742700a4457723652dd37c833a1b101583a7a3 (patch)
treee28848581258cbaa1fdec52d15f84decf51589f1 /src
parent998ed796c37b04ca0c772cf371bcb6429f86e16f (diff)
virtphy: Fix array out of bounds access in getL1ctlPrimName()
Closes: CID#198573 Change-Id: I6504a7ffcf961d3162e6ab2ec8f5f2016ef12cde
Diffstat (limited to 'src')
-rw-r--r--src/host/virt_phy/src/logging.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/host/virt_phy/src/logging.c b/src/host/virt_phy/src/logging.c
index a3e63bc5..7e4e79b1 100644
--- a/src/host/virt_phy/src/logging.c
+++ b/src/host/virt_phy/src/logging.c
@@ -128,7 +128,7 @@ int ms_log_init(char *cat_mask)
const char *getL1ctlPrimName(uint8_t type)
{
- if (type <= ARRAY_SIZE(l1ctlPrimNames))
+ if (type < ARRAY_SIZE(l1ctlPrimNames))
return l1ctlPrimNames[type];
else
return "Unknwon Primitive";