Commit a6c522c
committed
Solve dmi_memory_device_extended_size WORD issue
In case 17:
dmi_memory_device_extended_size(sect_n, WORD(data + 0x1C)); may cause memory capcity read error. This because WORD and DWORD have different byte size, the DWORD is double long of WORD.
After SMBIOS v2.8.0, the structures assume to be little-endian order. So redefine the WORD and DWORD in types.h.
Signed-off-by: Zhongze Hu <joshuahu@tencent.com>1 parent 50e9593 commit a6c522c
2 files changed
+11
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5378 | 5378 | | |
5379 | 5379 | | |
5380 | 5380 | | |
5381 | | - | |
| 5381 | + | |
5382 | 5382 | | |
5383 | 5383 | | |
5384 | 5384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
83 | 81 | | |
84 | 82 | | |
85 | 83 | | |
86 | | - | |
| 84 | + | |
87 | 85 | | |
88 | 86 | | |
0 commit comments