mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Commit revised version of Igor Kovalenko's patch for detecting whether dictionary allocations have overrun the memory
buffer allocated for them. Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@741 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Mark Cave-Ayland
parent
2f18dff299
commit
2d74db1de3
@@ -22,7 +22,8 @@
|
||||
void boot(void);
|
||||
void collect_sys_info(struct sys_info *info);
|
||||
|
||||
static unsigned char intdict[256 * 1024];
|
||||
#define DICTIONARY_SIZE (256*1024) /* 256K for the dictionary */
|
||||
static unsigned char intdict[DICTIONARY_SIZE];
|
||||
|
||||
#ifdef CONFIG_DRIVER_PCI
|
||||
static const pci_arch_t default_pci_host = {
|
||||
@@ -86,6 +87,8 @@ int openbios(void)
|
||||
collect_sys_info(&sys_info);
|
||||
|
||||
dict=intdict;
|
||||
dictlimit = DICTIONARY_SIZE;
|
||||
|
||||
load_dictionary((char *)sys_info.dict_start,
|
||||
(unsigned long)sys_info.dict_end -
|
||||
(unsigned long)sys_info.dict_start);
|
||||
|
||||
Reference in New Issue
Block a user