diff options
author | Leah Rowe <leah@libreboot.org> | 2022-12-03 11:49:52 +0000 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2022-12-03 11:49:52 +0000 |
commit | a6d0112d863c6ab0be806f36823b584c48636a52 (patch) | |
tree | ad6a77ff111da4457c3b96b4f76a225907103846 /util/nvmutil/nvmutil.c | |
parent | 04ced693e82192e5437105533b43da9e57cd22fe (diff) |
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
Diffstat (limited to 'util/nvmutil/nvmutil.c')
-rw-r--r-- | util/nvmutil/nvmutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 5a28a9a7..11484533 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -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; |