diff options
author | pjd <pjd@FreeBSD.org> | 2007-05-28 00:26:20 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2007-05-28 00:26:20 +0000 |
commit | 759f95279d77fb1537e48715c5a2faa162db23be (patch) | |
tree | 03b8a8a5a99f81030b1aedb178ea754678577b2f /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c | |
parent | 8343d42419e8b75046370cb88692d5f0a108d255 (diff) | |
download | FreeBSD-src-759f95279d77fb1537e48715c5a2faa162db23be.zip FreeBSD-src-759f95279d77fb1537e48715c5a2faa162db23be.tar.gz |
Because we allocate componentname structures on stack, bzero() them before
use just in case.
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c index d1ac49d..0b600ef 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c @@ -154,6 +154,7 @@ zfs_replay_remove(zfsvfs_t *zfsvfs, lr_remove_t *lr, boolean_t byteswap) if ((error = zfs_zget(zfsvfs, lr->lr_doid, &dzp)) != 0) return (error); + bzero(&cn, sizeof(cn)); cn.cn_nameptr = name; cn.cn_namelen = strlen(name); cn.cn_nameiop = DELETE; @@ -246,6 +247,7 @@ zfs_replay_rename(zfsvfs_t *zfsvfs, lr_rename_t *lr, boolean_t byteswap) svp = tvp = NULL; + bzero(&scn, sizeof(scn)); scn.cn_nameptr = sname; scn.cn_namelen = strlen(sname); scn.cn_nameiop = DELETE; @@ -260,6 +262,7 @@ zfs_replay_rename(zfsvfs_t *zfsvfs, lr_rename_t *lr, boolean_t byteswap) goto fail; VOP_UNLOCK(svp, 0, td); + bzero(&tcn, sizeof(tcn)); tcn.cn_nameptr = tname; tcn.cn_namelen = strlen(tname); tcn.cn_nameiop = RENAME; |