Skip to content

Commit e054d3b

Browse files
committed
Fix win32 compilation after upstream source synchro
1 parent 8dd85f5 commit e054d3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dmidecode.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -5971,7 +5971,7 @@ static int smbios3_decode(u8 *buf, size_t buf_len, const char *devmem, u32 flags
59715971
offset = QWORD(buf);
59725972
} else {
59735973
/* Don't let checksum run beyond the buffer */
5974-
if (buf[0x06] > 0x20)
5974+
if (buf[0x06] > buf_len)
59755975
{
59765976
fprintf(stderr,
59775977
"Entry point length too large (%u bytes, expected %u).\n",
@@ -6341,10 +6341,10 @@ int main(int argc, char * const argv[])
63416341
* Windows NT, 2000 and XP still accessing physical memory througth
63426342
* mem_chunck
63436343
*/
6344+
size_t size;
63446345
#ifdef __WIN32__
63456346
PRawSMBIOSData smb = NULL;
63466347
#else
6347-
size_t size;
63486348
int efi;
63496349
#endif /* __WIN32__ */
63506350
u8 *buf = NULL;

0 commit comments

Comments
 (0)