gtk2/modules/printbackends
Emmanuele Bassi 8f8b68f847 Terminate strncpy() buffers correctly
When using strncpy() with a buffer we need to account for the
terminating NUL character. GCC 8 started warning when using PPD_MAX_NAME
as the buffer length for strncpy() because the buffer we're copying into
has the same length — which means that the terminating NUL may be
skipped if the source string has a length of PPD_MAX_NAME.

The appropriate way to handle the case where we're copying a source with
a length bigger than of PPD_MAX_NAME is, as reported in the strncpy()
documentation, to copy `PPD_MAX_NAME - 1` bytes, and explicitly NUL
terminate the destination buffer. This has the additional benefit of
avoiding the compiler warning.
2019-02-05 15:34:08 +01:00
..
cloudprint printing: Fix compiler warnings 2015-06-02 09:08:14 -04:00
cups Terminate strncpy() buffers correctly 2019-02-05 15:34:08 +01:00
file Avoid some compiler warnings 2017-03-26 15:05:18 +01:00
lpr build: Set no_undefined in Makefile.decl 2014-09-15 16:35:40 +02:00
papi modules: fix gtk-2.0 paths to gtk-3.0 2018-06-22 13:53:43 +01:00
test build: Set no_undefined in Makefile.decl 2014-09-15 16:35:40 +02:00
Makefile.am printbackends: Fix make dist 2014-03-03 07:33:53 +01:00