]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
libcupsfilters: Silenced compiler warnings in rastertopwg()
authorTill Kamppeter <till.kamppeter@gmail.com>
Wed, 7 Jul 2021 09:01:34 +0000 (11:01 +0200)
committerTill Kamppeter <till.kamppeter@gmail.com>
Wed, 7 Jul 2021 09:01:34 +0000 (11:01 +0200)
cupsfilters/rastertopwg.c

index acdbb8938166fe4708557d0e4f0841e7f81e3208..8a3a974d9ab9a0e1c9537dd1d987ce57381982b6 100644 (file)
@@ -321,7 +321,7 @@ cups_file_t          *inputfp;              /* Print file */
     if (inheader.cupsPageSizeName[0] && (pwg_size = ppdCacheGetSize(cache, inheader.cupsPageSizeName)) != NULL && pwg_size->map.pwg)
     {
       strncpy(outheader.cupsPageSizeName, pwg_size->map.pwg,
-             sizeof(outheader.cupsPageSizeName));
+             sizeof(outheader.cupsPageSizeName) - 1);
     }
     else
     {
@@ -330,7 +330,7 @@ cups_file_t          *inputfp;              /* Print file */
 
       if (pwg_media)
         strncpy(outheader.cupsPageSizeName, pwg_media->pwg,
-                sizeof(outheader.cupsPageSizeName));
+                sizeof(outheader.cupsPageSizeName) - 1);
       else
       {
         if(log) log(ld, FILTER_LOGLEVEL_DEBUG, "rastertopwg: Unsupported PageSize %.2fx%.2f.",