Print this page
10140 notify_params.c is walking past end of array
@@ -85,11 +85,11 @@
* for index
*/
const char *
get_fma_tag(uint32_t index)
{
- if (index > (sizeof (fma_tags) / sizeof (struct fma_tags)))
+ if (index >= (sizeof (fma_tags) / sizeof (struct fma_tags)))
return (NULL);
return (fma_tags[index].t);
}
@@ -99,11 +99,11 @@
* for index
*/
const char *
get_fma_class(uint32_t index)
{
- if (index > (sizeof (fma_tags) / sizeof (struct fma_tags)))
+ if (index >= (sizeof (fma_tags) / sizeof (struct fma_tags)))
return (NULL);
return (fma_tags[index].s);
}