Content-Length: 276052 | pFad | http://github.com/postgrespro/postgres/commit/649aeb123f73e69cf78c52b534c15c51a229d63d

86 Cope with indicator arrays that do not have the correct length. · postgrespro/postgres@649aeb1 · GitHub
Skip to content

Commit 649aeb1

Browse files
author
Michael Meskes
committed
Cope with indicator arrays that do not have the correct length.
Patch by: "Rader, David" <davidr@openscg.com>
1 parent 255f141 commit 649aeb1

File tree

1 file changed

+10
-0
lines changed
  • src/interfaces/ecpg/preproc

1 file changed

+10
-0
lines changed

src/interfaces/ecpg/preproc/type.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,17 @@ ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsize
609609
prefix, ind_prefix, arrsize, type->struct_sizeof,
610610
(ind_p != NULL) ? ind_type->struct_sizeof : NULL);
611611
if (ind_p != NULL && ind_p != &struct_no_indicator)
612+
{
612613
ind_p = ind_p->next;
614+
if (ind_p == NULL && p->next != NULL) {
615+
mmerror(PARSE_ERROR, ET_WARNING, "indicator struct \"%s\" has too few members", ind_name);
616+
ind_p = &struct_no_indicator;
617+
}
618+
}
619+
}
620+
621+
if (ind_type != NULL && ind_p != NULL && ind_p != &struct_no_indicator) {
622+
mmerror(PARSE_ERROR, ET_WARNING, "indicator struct \"%s\" has too many members", ind_name);
613623
}
614624

615625
free(pbuf);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/649aeb123f73e69cf78c52b534c15c51a229d63d

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy