diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2014-05-24 02:27:32 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2014-05-24 02:27:32 +0000 |
commit | 993e9bf566ce49b65ef69ce3e53c3f4d8f74e65d (patch) | |
tree | 368f20b8612eb5cd946a575c069243aebd377b01 /sbin/fsck_ext2fs | |
parent | 17bfb2ae980ca19650c68db98d8192985b42927c (diff) |
Don't potentially use stack garbage for e2d_type. Initialize
newent.e2d_type to EXT2_FT_UNKNOWN, a.k.a. 0.
Spotted by -Wall.
Diffstat (limited to 'sbin/fsck_ext2fs')
-rw-r--r-- | sbin/fsck_ext2fs/dir.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/fsck_ext2fs/dir.c b/sbin/fsck_ext2fs/dir.c index 875f13ffa8b..f24f1675a15 100644 --- a/sbin/fsck_ext2fs/dir.c +++ b/sbin/fsck_ext2fs/dir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dir.c,v 1.17 2014/05/21 17:52:26 krw Exp $ */ +/* $OpenBSD: dir.c,v 1.18 2014/05/24 02:27:31 krw Exp $ */ /* $NetBSD: dir.c,v 1.5 2000/01/28 16:01:46 bouyer Exp $ */ /* @@ -310,6 +310,7 @@ mkentry(struct inodesc *idesc) struct ext2fs_direct newent; int newlen, oldlen; + newent.e2d_type = EXT2_FT_UNKNOWN; newent.e2d_namlen = strlen(idesc->id_name); if (sblock.e2fs.e2fs_rev > E2FS_REV0 && (sblock.e2fs.e2fs_features_incompat & EXT2F_INCOMPAT_FTYPE)) |