Skip to content

Commit d316ba8

Browse files
committed
format_variable_info(): fix wrong size test.
Coverity correctly discovered that when I switched "bufsz" and "sz" to make "bufsz" be the one that was the size of "buf", I missed one of the conditionals using it. Signed-off-by: Peter Jones <pjones@redhat.com>
1 parent 617aed5 commit d316ba8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mok.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ format_variable_info(UINT8 *buf, size_t bufsz,
167167
dprint(L"EFI %d.%d; no RT->QueryVariableInfo() %a\n",
168168
EFI_MAJOR_VERSION(RT), EFI_MINOR_VERSION(RT),
169169
is_apple_firmware_vendor() ? "(Apple)" : "");
170-
if (sz > 0)
170+
if (bufsz > 0)
171171
buf[0] = '\0';
172172
return 0;
173173
} else {

0 commit comments

Comments
 (0)