diff options
author | John Levon <john.levon@joyent.com> | 2018-12-19 18:43:34 +0000 |
---|---|---|
committer | John Levon <john.levon@joyent.com> | 2019-02-26 16:08:25 +0000 |
commit | 257e498f8b87ab41b7de15a76a08f79919b47fcb (patch) | |
tree | e0f29786dd990954a29f59e8a0f622d3c6b69f99 | |
parent | 658896ded15d61093d11b1040377964091aaee08 (diff) | |
download | illumos-joyent-257e498f8b87ab41b7de15a76a08f79919b47fcb.tar.gz |
10140 notify_params.c is walking past end of array
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Gergő Doma <domag02@gmail.com>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/cmd/svc/common/notify_params.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/src/cmd/svc/common/notify_params.c b/usr/src/cmd/svc/common/notify_params.c index e947b0fa76..16104d899e 100644 --- a/usr/src/cmd/svc/common/notify_params.c +++ b/usr/src/cmd/svc/common/notify_params.c @@ -87,7 +87,7 @@ static char *fma_classes[] = { 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); @@ -101,7 +101,7 @@ get_fma_tag(uint32_t 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); |