mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-24 19:21:38 +01:00
Make mdconfig(8) not segfault when the kernel returns garbage data.
MFC after: 2 weeks Sponsored by: DARPA, AFRL
This commit is contained in:
parent
316e092a77
commit
30545786bb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=313943
@ -452,8 +452,8 @@ md_list(const char *units, int opt, const char *fflag)
|
||||
}
|
||||
gc = &pp->lg_config;
|
||||
type = geom_config_get(gc, "type");
|
||||
if (strcmp(type, "vnode") == 0 ||
|
||||
strcmp(type, "preload") == 0) {
|
||||
if (type != NULL && (strcmp(type, "vnode") == 0 ||
|
||||
strcmp(type, "preload") == 0)) {
|
||||
file = geom_config_get(gc, "file");
|
||||
if (fflag != NULL &&
|
||||
strcmp(fflag, file) != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user