[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] commands/setpci: honor write mask argument
From: |
Wouter van Kesteren |
Subject: |
[PATCH] commands/setpci: honor write mask argument |
Date: |
Thu, 12 Aug 2021 16:56:13 +0200 |
In the case that one passes a write mask with :
the write_mask is obtained from grub_strtoul and then
promptly overwritten by 0xffffffff three lines later.
This appears to have been so since the initial version of setpci in 2009.
I'm suprised no one else has hit this issue in the past 12 years...
---
grub-core/commands/setpci.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/grub-core/commands/setpci.c b/grub-core/commands/setpci.c
index 8a0c91f02..5917625f8 100644
--- a/grub-core/commands/setpci.c
+++ b/grub-core/commands/setpci.c
@@ -311,7 +311,6 @@ grub_cmd_setpci (grub_extcmd_context_t ctxt, int argc, char
**argv)
write_mask = grub_strtoul (ptr, &ptr, 16);
if (grub_errno)
return grub_errno;
- write_mask = 0xffffffff;
}
regwrite &= write_mask;
}
--
2.32.0
- [PATCH] commands/setpci: honor write mask argument,
Wouter van Kesteren <=