gtk2/modules/printbackends/cups
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
..
gtkcupssecretsutils.c Avoid O(n²) walking of string arrays 2015-07-16 16:19:55 +01:00
gtkcupssecretsutils.h Use secrets service for cups auth_info 2014-09-01 22:39:51 +02:00
gtkcupsutils.c printing: Check connection to remote CUPS server on correct port 2015-05-13 12:28:49 +02:00
gtkcupsutils.h printing: Check connection to remote CUPS server on correct port 2015-05-13 12:28:49 +02:00
gtkprintbackendcups.c Terminate strncpy() buffers correctly 2019-02-05 15:34:08 +01:00
gtkprintbackendcups.h Change FSF Address 2012-02-27 17:06:11 +00:00
gtkprintercups.c cups: Warn only once if colord is not available 2017-12-17 17:11:27 -05:00
gtkprintercups.h printing: Don't show duplicate printers 2017-10-09 18:02:28 +02:00
Makefile.am build: Set no_undefined in Makefile.decl 2014-09-15 16:35:40 +02:00