add NULL name check

This commit is contained in:
Wei-keng Liao 2016-10-12 13:45:41 -05:00
parent 125ca43cfb
commit df91c19f3c

View File

@ -806,6 +806,9 @@ NC3_put_att(
if(ncap == NULL)
return NC_ENOTVAR;
if (name == NULL)
return NC_EBADNAME;
status = nc3_cktype(nc->mode, type);
if(status != NC_NOERR)
return status;