Pull up following revision(s) (requested by tsutsui in ticket #1184):
sbin/fsck/partutil.c: revision 1.17 initialize disk_dict to NULL. otherwise, if DIOCGDISKINFO returns an error != ENXIO getdiskinfo() later tries to prop_object_release() stack garbage. found by rumpctrl tests using clang-7.
This commit is contained in:
parent
8b3a0b1581
commit
8100428013
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: partutil.c,v 1.15.18.1 2019/08/18 13:31:21 msaitoh Exp $ */
|
||||
/* $NetBSD: partutil.c,v 1.15.18.2 2021/01/09 19:30:14 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 The NetBSD Foundation, Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: partutil.c,v 1.15.18.1 2019/08/18 13:31:21 msaitoh Exp $");
|
||||
__RCSID("$NetBSD: partutil.c,v 1.15.18.2 2021/01/09 19:30:14 martin Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -108,6 +108,7 @@ getdiskinfo(const char *s, int fd, const char *dt, struct disk_geom *geo,
|
|||
}
|
||||
|
||||
/* Get disk description dictionary */
|
||||
disk_dict = NULL;
|
||||
error = prop_dictionary_recv_ioctl(fd, DIOCGDISKINFO, &disk_dict);
|
||||
|
||||
/* fail quickly if the device does not exist at all */
|
||||
|
|
Loading…
Reference in New Issue