Where strncat() is called with a fixed string source, increase the size by one.
authorDavid Griffith <dave@661.org>
Wed, 30 Jan 2019 15:17:51 +0000 (07:17 -0800)
committerDavid Griffith <dave@661.org>
Wed, 30 Jan 2019 15:17:51 +0000 (07:17 -0800)
commit6ee99799f30b55b90f2b3d0bfa4e85136b62a03a
tree9e4105093b52a31380780e79ba43c39f55db733a
parentcedbc866cce0384d3fd23168d1d97f1d6304af22
Where strncat() is called with a fixed string source, increase the size by one.

GCC version 8 introduced some new warnings on strncat() usage in an
effort to warn about unsafe usage.  When the source string is a constant
literal and there will always be enough space in the destination, then
you could safely use strcat().  But lots of error-checking processes
will balk at ANY usage of strcat().  Given all this, putting a size of
something greater than the source will cause no harm.

See https://github.com/gcc-mirror/gcc/commit/d8aad7864e5b4c654dcea86b98085baf36d8db76
src/curses/ux_init.c
src/dumb/dumb_init.c
src/sdl/sf_util.c