]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
libcupsfilters: Let pdftopdf() not send NULL to log function
authorTill Kamppeter <till.kamppeter@gmail.com>
Thu, 30 Dec 2021 14:28:06 +0000 (11:28 -0300)
committerTill Kamppeter <till.kamppeter@gmail.com>
Thu, 30 Dec 2021 14:28:06 +0000 (11:28 -0300)
The variable holding the value of FINAL_CONTENT_TYPE is NULL when the
environment variable is not set. At one place the variable value gets
logged using the log function. Do not send NULL here, to avoid a crash
of the log function.

cupsfilters/pdftopdf/pdftopdf.cc

index 2642936b078050c622f8e3cbbb3da4ccc32a34b2..9024b6a4f1c24ec3a1ffa888ae3990138a24e5e4 100644 (file)
@@ -867,7 +867,8 @@ bool checkFeature(const char *feature, int num_options, cups_option_t *options)
                                     "%s => pdftopdf will %slog pages in "
                                     "page_log.",
                                     (lastfilter ? lastfilter : "None"),
-                                    final_content_type,
+                                    (final_content_type ? final_content_type :
+                                     "(not supplied)"),
                                     (param.page_logging == 0 ? "not " : ""));
     }
   }