aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-02-22 22:58:54 +0100
committerH. Peter Anvin <hpa@zytor.com>2009-02-25 20:58:44 -0800
commitf1a8cf3349a7ceece3153eebe1cb6e4e6b254ab0 (patch)
tree41909b3b7595c274854381c10df95408bd4eaea9
parent4675b2b23fbd096e385df865f9f628b228401e99 (diff)
downloadsyslinux-elf-f1a8cf3349a7ceece3153eebe1cb6e4e6b254ab0.tar.gz
syslinux-elf-f1a8cf3349a7ceece3153eebe1cb6e4e6b254ab0.tar.xz
syslinux-elf-f1a8cf3349a7ceece3153eebe1cb6e4e6b254ab0.zip
hdt: Fixing DMI memory corruption
-rw-r--r--com32/modules/dmi.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/com32/modules/dmi.c b/com32/modules/dmi.c
index f307cdc2..3cbc3521 100644
--- a/com32/modules/dmi.c
+++ b/com32/modules/dmi.c
@@ -318,14 +318,14 @@ int dmi_iterate(s_dmi *dmi) {
char *p,*q;
/* Cleaning structures */
- memset(&(dmi->base_board),0,sizeof dmi->base_board);
- memset(&(dmi->battery),0,sizeof dmi->battery);
- memset(&(dmi->bios),0,sizeof dmi->bios);
- memset(&(dmi->chassis),0,sizeof dmi->chassis);
+ memset(&dmi->base_board,0,sizeof (s_base_board));
+ memset(&dmi->battery,0,sizeof (s_battery));
+ memset(&dmi->bios,0,sizeof (s_bios));
+ memset(&dmi->chassis,0,sizeof (s_chassis));
for (int i=0;i<MAX_DMI_MEMORY_ITEMS;i++)
- memset(&(dmi->memory[i]),0,sizeof dmi->memory);
- memset(&(dmi->processor),0,sizeof dmi->processor);
- memset(&(dmi->system),0,sizeof dmi->system);
+ memset(&dmi->memory[i],0,sizeof (s_memory));
+ memset(&dmi->processor,0,sizeof (s_processor));
+ memset(&dmi->system,0,sizeof (s_system));
/* Until we found this elements in the dmitable, we consider them as not filled */
dmi->base_board.filled=false;
@@ -337,7 +337,6 @@ int dmi_iterate(s_dmi *dmi) {
dmi->processor.filled=false;
dmi->system.filled=false;
-
p=(char *)0xF0000; /* The start address to look at the dmi table */
for (q = p; q < p + 0x10000; q += 16) {
memcpy(buf, q, 15);