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

Discussion of development and patch submission.
Post Reply
shermanp
Posts: 70
Joined: Sat 18 Feb, 2017 2:09 am

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

Post by shermanp » Mon 04 Jun, 2018 5:39 am

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.

User avatar
SarahWalker
Site Admin
Posts: 1542
Joined: Thu 24 Apr, 2014 4:18 pm

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

Post by SarahWalker » Mon 04 Jun, 2018 7:06 pm

Fixed in rev 1183.

shermanp
Posts: 70
Joined: Sat 18 Feb, 2017 2:09 am

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

Post by shermanp » Mon 04 Jun, 2018 9:36 pm

SarahWalker wrote:
Mon 04 Jun, 2018 7:06 pm
Fixed in rev 1183.
Thanks.

Post Reply