aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zdb
diff options
context:
space:
mode:
authorIgor Kozhukhov <[email protected]>2016-06-15 14:28:36 -0700
committerBrian Behlendorf <[email protected]>2016-06-28 13:47:03 -0700
commiteca7b76001a7d33f78bd98884aef8325bdbf98e7 (patch)
treebdcd0489c5a6c7840258c4c6063c9a4903bec256 /cmd/zdb
parent43e52eddb13d8accbd052fac9a242ce979531aa4 (diff)
OpenZFS 6314 - buffer overflow in dsl_dataset_name
Reviewed by: George Wilson <[email protected]> Reviewed by: Prakash Surya <[email protected]> Reviewed by: Igor Kozhukhov <[email protected]> Approved by: Dan McDonald <[email protected]> Ported-by: Brian Behlendorf <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/6314 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/d6160ee
Diffstat (limited to 'cmd/zdb')
-rw-r--r--cmd/zdb/zdb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c
index ee5e21f10..967d74216 100644
--- a/cmd/zdb/zdb.c
+++ b/cmd/zdb/zdb.c
@@ -60,7 +60,6 @@
#include <sys/ddt.h>
#include <sys/zfeature.h>
#include <zfs_comutil.h>
-#undef ZFS_MAXNAMELEN
#include <libzfs.h>
#define ZDB_COMPRESS_NAME(idx) ((idx) < ZIO_COMPRESS_FUNCTIONS ? \
@@ -2005,7 +2004,7 @@ dump_dir(objset_t *os)
uint64_t refdbytes, usedobjs, scratch;
char numbuf[32];
char blkbuf[BP_SPRINTF_LEN + 20];
- char osname[MAXNAMELEN];
+ char osname[ZFS_MAX_DATASET_NAME_LEN];
char *type = "UNKNOWN";
int verbosity = dump_opt['d'];
int print_header = 1;
@@ -3553,7 +3552,7 @@ find_zpool(char **target, nvlist_t **configp, int dirc, char **dirv)
nvlist_t *match = NULL;
char *name = NULL;
char *sepp = NULL;
- char sep = 0;
+ char sep = '\0';
int count = 0;
importargs_t args = { 0 };