bhyve: Report an error for invalid UUIDs.
Reviewed by: rgrimes, grehan, jhb Differential Revision: https://reviews.freebsd.org/D30050
This commit is contained in:
parent
f22068d91b
commit
e16b709e2d
@ -1536,7 +1536,8 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
error = smbios_build(ctx);
|
||||
assert(error == 0);
|
||||
if (error != 0)
|
||||
exit(4);
|
||||
|
||||
if (get_config_bool("acpi_tables")) {
|
||||
error = acpi_build(ctx, guest_ncpus);
|
||||
|
@ -666,8 +666,10 @@ smbios_type1_initializer(struct smbios_structure *template_entry,
|
||||
uint32_t status;
|
||||
|
||||
uuid_from_string(guest_uuid_str, &uuid, &status);
|
||||
if (status != uuid_s_ok)
|
||||
if (status != uuid_s_ok) {
|
||||
EPRINTLN("Invalid UUID");
|
||||
return (-1);
|
||||
}
|
||||
|
||||
uuid_enc_le(&type1->uuid, &uuid);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user