diff options
author | Zou Nan hai <nanhai.zou@intel.com> | 2006-02-07 11:25:55 +0800 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-02-07 10:59:37 -0800 |
commit | ecdd5dabd33d67066d476467e447cdcadab90550 (patch) | |
tree | c2387dcd3e1926193cec6db89ceac75dd63e207c | |
parent | d43da75fd6be4197c280903e1553eafcc39218e2 (diff) | |
download | blackbird-op-linux-ecdd5dabd33d67066d476467e447cdcadab90550.tar.gz blackbird-op-linux-ecdd5dabd33d67066d476467e447cdcadab90550.zip |
[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>
-rw-r--r-- | arch/ia64/kernel/efi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index c485a3b32ba8..d51c2f214875 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c @@ -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'; } |