Skip to content

Commit

Permalink
Redacted Send/Receive causes zdb to dump core
Browse files Browse the repository at this point in the history
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
  • Loading branch information
loli10K authored and behlendorf committed Jun 25, 2019
1 parent 746d4a4 commit 5279ae9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/zdb/zdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 5279ae9

Please sign in to comment.