Corrected a potential unix API error.

This commit is contained in:
Ward Fisher 2019-10-24 13:54:38 -06:00
parent 4596e1bc8b
commit f62412fa79

View File

@ -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);