sarah-walker-pcem / pcem

PCem
http://pcem-emulator.co.uk
GNU General Public License v2.0
1.55k stars 216 forks source link

Multiple off by one errors #232

Open dcb314 opened 1 year ago

dcb314 commented 1 year ago

slirp/misc.c:675:6: error: Width 256 given in format string (no. 1) is larger than destination buffer 'buff2[256]', use %255s to prevent overflowing it. [invalidScanfFormatWidth] slirp/misc.c:690:7: error: Width 256 given in format string (no. 1) is larger than destination buffer 'buff1[256]', use %255s to prevent overflowing it. [invalidScanfFormatWidth] slirp/slirp.c:98:13: error: Width 256 given in format string (no. 1) is larger than destination buffer 'buff2[256]', use %255s to prevent overflowing it. [invalidScanfFormatWidth] slirp/tcp_subr.c:992:8: error: Width 256 given in format string (no. 7) is larger than destination buffer 'buff[256]', use %255[^] to prevent overflowing it. [invalidScanfFormatWidth] slirp/tcp_subr.c:1023:8: error: Width 256 given in format string (no. 7) is larger than destination buffer 'buff[256]', use %255[^] to prevent overflowing it. [invalidScanfFormatWidth] slirp/tcp_subr.c:1083:7: error: Width 256 given in format string (no. 1) is larger than destination buffer 'buff[256]', use %255s to prevent overflowing it. [invalidScanfFormatWidth] slirp/tcp_subr.c:1091:14: error: Width 256 given in format string (no. 1) is larger than destination buffer 'buff[256]', use %255s to prevent overflowing it. [invalidScanfFormatWidth] slirp/tcp_subr.c:1099:14: error: Width 256 given in format string (no. 1) is larger than destination buffer 'buff[256]', use %255s to prevent overflowing it. [invalidScanfFormatWidth]

JosepMaJAZ commented 5 months ago

Those line numbers correspond to version 17. I see that in dev (version 18) the problems are still there, but the line numbers do not match.

I am adding this here just so that it isn't discarded due to this discrepancy.