Page 1 of 1

[COMPILE WARN/ERROR] String overflow error in pc.c

Posted: Mon 04 Jun, 2018 5:39 am
by shermanp
My compiler (Mingw-w64 w/ GCC 7.1) has thrown up a string overflow error in the initpc function of pc.c.

The problem occurs here:

Code: Select all

strncpy(discfns[0], argv[c+1], 260);
The root cause is in ibm.h here:

Code: Select all

char discfns[2][256];
I have fixed it in my local environment, but I don't particularly want to commit this change when I'm about to commit a completely different change (and have the patch based directly from v14). Also, it's so trivial, it's not worth me submitting a patch IMHO.

Re: [COMPILE WARN/ERROR] String overflow error in pc.c

Posted: Mon 04 Jun, 2018 7:06 pm
by SarahWalker
Fixed in rev 1183.

Re: [COMPILE WARN/ERROR] String overflow error in pc.c

Posted: Mon 04 Jun, 2018 9:36 pm
by shermanp
SarahWalker wrote: Mon 04 Jun, 2018 7:06 pm Fixed in rev 1183.
Thanks.