]> git.proxmox.com Git - mirror_zfs.git/commit - cmd/zdb/zdb.c
zdb: Fix handling of nul termination in symlink targets
authorMark Johnston <markjdb@gmail.com>
Fri, 20 May 2022 17:32:49 +0000 (13:32 -0400)
committerGitHub <noreply@github.com>
Fri, 20 May 2022 17:32:49 +0000 (10:32 -0700)
commit03df6bad94504b80929b332a3e5fbfbc8bdae04b
tree31dddcf5d0b13fa9fa39dd1d3bb6743ef650f5b2
parente02d84d3a5158a942c3f09d11c973e5aabb6fa40
zdb: Fix handling of nul termination in symlink targets

The SA attribute containing the symlink target does not include a nul
terminator, so when printing the target zdb would sometimes include
garbage at the end of the string.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes #13482
cmd/zdb/zdb.c