Skip to content

Commit

Permalink
macOS: Do not truncate returned name in case correcting lookups
Browse files Browse the repository at this point in the history
macOS: also don't truncate further down
  • Loading branch information
lundman committed Jun 20, 2021
1 parent 28f63cb commit 7e9edb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/os/macos/zfs/zfs_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ zfs_match_find(zfsvfs_t *zfsvfs, znode_t *dzp, char *name, matchtype_t mt,

if (rpnp) {
buf = rpnp->cn_nameptr;
bufsz = rpnp->cn_namelen;
bufsz = rpnp->cn_pnlen;
}

/*
Expand Down Expand Up @@ -439,7 +439,7 @@ zfs_dirlook(znode_t *dzp, char *name, znode_t **zpp, int flags,
}

if ((flags & FIGNORECASE) && rpnp && !error)
(void) strlcpy(rpnp->cn_nameptr, name, rpnp->cn_namelen);
(void) strlcpy(rpnp->cn_nameptr, name, rpnp->cn_pnlen);

return (error);
}
Expand Down

0 comments on commit 7e9edb1

Please sign in to comment.