From 5279ae918befc707b3b2c5e9b97e2b6e8d033d99 Mon Sep 17 00:00:00 2001 From: loli10K Date: Tue, 25 Jun 2019 03:06:26 +0200 Subject: [PATCH] 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 Reviewed-by: Paul Dagnelie Signed-off-by: loli10K Closes #8948 --- cmd/zdb/zdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.40.0