From f62412fa79a20f3bd035f79bb8bda1afa5217c09 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Thu, 24 Oct 2019 13:54:38 -0600 Subject: [PATCH] Corrected a potential unix API error. --- ncdump/ncvalidator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ncdump/ncvalidator.c b/ncdump/ncvalidator.c index 083376f82..a0e4acb32 100644 --- a/ncdump/ncvalidator.c +++ b/ncdump/ncvalidator.c @@ -1426,7 +1426,7 @@ new_NC_attr(char *name, (*attrp)->nelems = nelems; (*attrp)->xvalue = NULL; (*attrp)->name = name; - (*attrp)->name_len = strlen(name); + (*attrp)->name_len = (name?strlen(name):0); if (nelems > 0) { long long xsz = x_len_NC_attrV(xtype, nelems);