[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#907399: Logs with systemd-coredump



Hello,
just a short addition.

Attached patch might already be enough to fix this issue.
It makes DomainSocket gets assigned a copy of the string literal.
That copy should be possible to free later.

This patch is untested except the package can be built.

Kind regards,
Bernhard
Description: Avoid free of string literal

Author: Bernhard Ã?belacker <bernhardu@mailbox.org>
Bug-Debian: https://bugs.debian.org/907399
Last-Update: 2018-09-01

--- cups-filters-1.21.1.orig/utils/cups-browsed.c
+++ cups-filters-1.21.1/utils/cups-browsed.c
@@ -8466,7 +8466,7 @@ int main(int argc, char*argv[]) {
   } else {
 #ifdef CUPS_DEFAULT_DOMAINSOCKET
     if (DomainSocket == NULL)
-      DomainSocket = CUPS_DEFAULT_DOMAINSOCKET;
+      DomainSocket = strdup(CUPS_DEFAULT_DOMAINSOCKET);
 #endif
     if (DomainSocket != NULL) {
       struct stat sockinfo;               /* Domain socket information */

Reply to: