diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2015-11-30 11:14:18 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2015-12-20 14:36:15 -0500 |
commit | 4cdbc4105499f9ec872fff929e9ab5296b294903 (patch) | |
tree | 16779b12cf6aa3e324eb67f9516503bbb2bc66c8 /src/tcgbios.c | |
parent | 15f192fbc765ce364bc93cd6c6c974a5bb32b854 (diff) | |
download | seabios-hppa-4cdbc4105499f9ec872fff929e9ab5296b294903.zip seabios-hppa-4cdbc4105499f9ec872fff929e9ab5296b294903.tar.gz seabios-hppa-4cdbc4105499f9ec872fff929e9ab5296b294903.tar.bz2 |
tpm: Check length parameter of the array
Check the length parameter that indicates the length of the array
for whether it has a minimum value of 0x200.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Diffstat (limited to 'src/tcgbios.c')
-rw-r--r-- | src/tcgbios.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tcgbios.c b/src/tcgbios.c index c17d80d..285723c 100644 --- a/src/tcgbios.c +++ b/src/tcgbios.c @@ -766,6 +766,9 @@ tpm_add_bcv(u32 bootdrv, const u8 *addr, u32 length) if (!has_working_tpm()) return TCG_GENERAL_ERROR; + if (length < 0x200) + return TCG_INVALID_INPUT_PARA; + const char *string = "Booting BCV device 00h (Floppy)"; if (bootdrv == 0x80) string = "Booting BCV device 80h (HDD)"; |