util/nvtutil: fix out of bounds error

the error would have never been triggered, because it never
went over 11, but if this code were to be copied elsewhere,
it would be problematic
This commit is contained in:
Leah Rowe
2022-12-03 11:49:52 +00:00
parent 04ced693e8
commit a6d0112d86
+1 -1
View File
@@ -220,7 +220,7 @@ hextonum(char chs)
static int macfd;
static uint8_t *rmac = NULL;
static int random;
if (random > 15) {
if (random > 11) {
close(macfd);
free(rmac);
rmac = NULL;