Fix a possible buffer overflow in efi.c
PATCH 1/1 Fix a possible buffer overflow in efi.c
There is a possible buffer overflow in efi.c
At lease the code logic is wrong.
Signed-off-by Zou Nan hai <[email protected]>
arch/ia64/kernel/efi.c +1 -1
@@ -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' ; }