dect
/
linux-2.6
Archived
13
0
Fork 0

[IA64] Fix a possible buffer overflow in efi.c

Make sure to save space for the trailing '\0'.

Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
This commit is contained in:
Zou Nan hai 2006-02-07 11:25:55 +08:00 committed by Tony Luck
parent d43da75fd6
commit ecdd5dabd3
1 changed files with 1 additions and 1 deletions

View File

@ -458,7 +458,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';
}