* [PATCH]Fix a possible buffer overflow in efi.c
@ 2006-02-07 3:25 Zou Nan hai
0 siblings, 0 replies; only message in thread
From: Zou Nan hai @ 2006-02-07 3:25 UTC (permalink / raw)
To: linux-ia64
There is a possible buffer overflow in efi.c
At lease the code logic is wrong.
Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
diff -Nraup linux-2.6.15/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
--- linux-2.6.15/arch/ia64/kernel/efi.c 2006-02-06 07:57:06.000000000 +0800
+++ b/arch/ia64/kernel/efi.c 2006-02-08 04:19:56.000000000 +0800
@@ -432,7 +432,7 @@ efi_init (void)
/* Show what we know for posterity */
c16 = __va(efi.systab->fw_vendor);
if (c16) {
- for (i = 0;i < (int) sizeof(vendor) && *c16; ++i)
+ for (i = 0;i < (int) sizeof(vendor) - 1 && *c16; ++i)
vendor[i] = *c16++;
vendor[i] = '\0';
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-02-07 3:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-07 3:25 [PATCH]Fix a possible buffer overflow in efi.c Zou Nan hai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox