diff --git a/tools/pvck.c b/tools/pvck.c index d81966966..b15158746 100644 --- a/tools/pvck.c +++ b/tools/pvck.c @@ -898,7 +898,7 @@ static int _dump_current_text(struct device *dev, struct devicefile *def, int ri = rlocn_index; /* 0 or 1 */ int bad = 0; - if (!(meta_buf = zalloc(meta_size))) { + if (!(meta_buf = zalloc(meta_size + 1))) { log_print("CHECK: mda_header_%d.raw_locn[%d] no mem for metadata text size %llu", mn, ri, (unsigned long long)meta_size); return 0;