diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 2d80589cafc0..90847d8d991c 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -4139,11 +4139,12 @@ zdb_embedded_block(char *thing) { blkptr_t bp; unsigned long long *words = (void *)&bp; - char buf[SPA_MAXBLOCKSIZE]; + char *buf; int err; - memset(&bp, 0, sizeof (blkptr_t)); + buf = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL); + bzero(&bp, sizeof (bp)); err = sscanf(thing, "%llx:%llx:%llx:%llx:%llx:%llx:%llx:%llx:" "%llx:%llx:%llx:%llx:%llx:%llx:%llx:%llx", words + 0, words + 1, words + 2, words + 3, @@ -4161,6 +4162,7 @@ zdb_embedded_block(char *thing) exit(1); } zdb_dump_block_raw(buf, BPE_GET_LSIZE(&bp), 0); + umem_free(buf, SPA_MAXBLOCKSIZE); } int