Correct a potential null pointer dereference.

This commit is contained in:
Ward Fisher 2023-02-27 15:48:57 -07:00
parent 267b26f123
commit 0ff269a4e0

View File

@ -494,6 +494,7 @@ parseVlenField(NCD4parser* parser, NCD4node* container, ncxml_t xml, NCD4node**
if((ret = parseVariable(parser,container,x,&field)))
goto done;
}
if(field == NULL) {ret = NC_EBADTYPE; goto done;}
if(fieldp) *fieldp = field;
done:
return THROW(ret);