summaryrefslogtreecommitdiff
path: root/util/nvmutil
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-03 15:41:21 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-03 15:41:21 +0000
commit403fd260b5e1a0335e5fc2bfbff081e1c578dcb9 (patch)
tree2c90febc638e336823ae8b66e1547b2e23efff9d /util/nvmutil
parentd9d628e1461f762185f0737528eb517c254e130e (diff)
util/nvmutil: reduce the size of rnum to 12
we only need 12 bytes at a maximum Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
-rw-r--r--util/nvmutil/nvmutil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 214ded5e..bcf205c3 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -340,9 +340,9 @@ hextonum(char ch)
static uint8_t
rhex(void)
{
- static uint8_t n = 0, rnum[16];
+ static uint8_t n = 0, rnum[12];
if (!n)
- err_if(read(rfd, (uint8_t *) &rnum, (n = 15) + 1) == -1);
+ err_if(read(rfd, (uint8_t *) &rnum, (n = 11) + 1) == -1);
return rnum[n--] & 0xf;
}