From: loli10K Date: Tue, 25 Jun 2019 01:06:26 +0000 (+0200) Subject: Redacted Send/Receive causes zdb to dump core X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5279ae918befc707b3b2c5e9b97e2b6e8d033d99;p=zfs 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 --- 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); }