When compiling with -O3 gcc seems to be a lot stricter on its checks for
index out of bounds error.
Change-Id: I5a63e1db6aa2375223ff13c6352643a9804fa93d
cc.elements = 1;
np = sp->nsp;
if (np) {
- while (np && cc.elements <=
+ /* MINIX: off-by one error, has to be strictly less than. */
+ while (np && cc.elements <
CURSES_CCHAR_MAX) {
cc.vals[cc.elements++] = np->ch;
np = np->next;
if (*ep != '\0')
mtree_err("invalid number `%s'",
p);
- if (argc > MAX_PACK_ARGS)
+ /* MINIX: 03 warns for above array bounds*/
+ if (argc >= MAX_PACK_ARGS)
mtree_err("too many arguments");
}
if (argc < 2)