Skip to content
Snippets Groups Projects
Commit a0f5890a authored by Michael Meskes's avatar Michael Meskes
Browse files

Cope with indicator arrays that do not have the correct length.

Patch by: "Rader, David" <davidr@openscg.com>
parent 4e717005
No related branches found
No related tags found
No related merge requests found
......@@ -560,7 +560,17 @@ ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsiz,
prefix, ind_prefix, arrsiz, type->struct_sizeof,
(ind_p != NULL) ? ind_type->struct_sizeof : NULL);
if (ind_p != NULL && ind_p != &struct_no_indicator)
{
ind_p = ind_p->next;
if (ind_p == NULL && p->next != NULL) {
mmerror(PARSE_ERROR, ET_WARNING, "indicator struct \"%s\" has too few members", ind_name);
ind_p = &struct_no_indicator;
}
}
}
if (ind_type != NULL && ind_p != NULL && ind_p != &struct_no_indicator) {
mmerror(PARSE_ERROR, ET_WARNING, "indicator struct \"%s\" has too many members", ind_name);
}
free(pbuf);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment