summaryrefslogtreecommitdiffstats
path: root/cmd/zdb
diff options
context:
space:
mode:
authorloli10K <[email protected]>2019-06-25 03:06:26 +0200
committerBrian Behlendorf <[email protected]>2019-06-24 18:06:26 -0700
commit5279ae918befc707b3b2c5e9b97e2b6e8d033d99 (patch)
tree0da3877121fcb718e5e309c55fab30bc3077ec46 /cmd/zdb
parent746d4a451eaff3d90fb63b853b3f91920d8ab69c (diff)
Redacted Send/Receive causes zdb to dump core
When used with verbosity >= 4 zdb fails an assertion in dump_bookmarks() because it expects snprintf() to retun 0 on success. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Paul Dagnelie <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #8948
Diffstat (limited to 'cmd/zdb')
-rw-r--r--cmd/zdb/zdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c
index 3194fd082..969c8f1b7 100644
--- a/cmd/zdb/zdb.c
+++ b/cmd/zdb/zdb.c
@@ -1939,7 +1939,7 @@ dump_bookmarks(objset_t *os, int verbosity)
char osname[ZFS_MAX_DATASET_NAME_LEN];
char buf[ZFS_MAX_DATASET_NAME_LEN];
dmu_objset_name(os, osname);
- VERIFY0(snprintf(buf, sizeof (buf), "%s#%s", osname,
+ VERIFY3S(0, <=, snprintf(buf, sizeof (buf), "%s#%s", osname,
attr.za_name));
(void) dump_bookmark(dp, buf, verbosity >= 5, verbosity >= 6);
}