In platforms with bounds-checking enabled, placeholder values for array sizes in structs that may be exceeded always result in a sigtrap. This patch updates the following classes to use flexible arrays at the end of structs: - database - Label - PropertyRecord (union of three flexible arrays and a pointer*) - cellUE - extflat - HierName - EFAttr - Dev - utils - HashEntry (union of two flexible arrays and a pointer*) - internalUndoEvent: Was a plain int, replaced with a flexible char array Additionally, the database struct editUE, which would have just a single flexible-array member, was removed and simply replaced with a character pointer. Where possible, allocation size macros have been introduced. --- * It is noted flexible-length arrays as part of unions are not part of the C language spec and are a GNU99 extension, however, it is supported by both GCC and Clang. |
||
|---|---|---|
| .. | ||
| DBWbuttons.c | ||
| DBWcommands.c | ||
| DBWdisplay.c | ||
| DBWelement.c | ||
| DBWfdback.c | ||
| DBWhlights.c | ||
| DBWprocs.c | ||
| DBWtools.c | ||
| DBWundo.c | ||
| Makefile | ||
| dbwind.h | ||
| dbwtech.h | ||