Author: emaste
Date: Wed May 16 01:41:36 2018
New Revision: 333660
URL: https://svnweb.freebsd.org/changeset/base/333660
Log:
intel-ucode-split: exit on unknown ucode header version
Modified:
head/tools/tools/intel-ucode-split/intel-ucode-split.c
Modified: head/tools/tools/intel-ucode-split/intel-ucode-split.c
==============================================================================
--- head/tools/tools/intel-ucode-split/intel-ucode-split.c Wed May 16
01:34:36 2018 (r333659)
+++ head/tools/tools/intel-ucode-split/intel-ucode-split.c Wed May 16
01:41:36 2018 (r333660)
@@ -78,7 +78,7 @@ dump_header(const struct microcode_update_header *hdr)
{
char buf[16];
- printf("version\t\t0x%x\n", hdr->header_version);
+ printf("header version\t0x%x\n", hdr->header_version);
printf("revision\t0x%x\n", hdr->update_revision);
printf("date\t\t0x%x\t%04x-%02x-%02x\n", hdr->date,
hdr->date & 0xffff, (hdr->date & 0xff000000) >> 24,
@@ -147,6 +147,8 @@ main(int argc, char *argv[])
} else if (rv < (ssize_t)sizeof(hdr)) {
errx(1, "invalid microcode header");
}
+ if (hdr.header_version != 1)
+ errx(1, "invalid header version");
if (vflag)
dump_header(&hdr);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"