virtphy: Fix array out of bounds access in getL1ctlPrimName()

Closes: CID#198573
Change-Id: I6504a7ffcf961d3162e6ab2ec8f5f2016ef12cde
This commit is contained in:
Harald Welte 2019-07-21 08:00:35 +02:00
parent 998ed796c3
commit 4b742700a4
1 changed files with 1 additions and 1 deletions

View File

@ -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";