Date: Fri, 25 Apr 2014 19:47:32 +0400 From: Boris Samorodov <bsam@passap.ru> To: Stefan Bethke <stb@lassitu.de>, Robert Backhaus <robbak@robbak.com> Cc: Freebsd_mailinglist_PORTS <freebsd-ports@freebsd.org> Subject: Re: foomatic-rip and foo2zjs Message-ID: <535A8394.4060507@passap.ru> In-Reply-To: <C30C335D-DCA2-4B26-A9E6-400361ABFBF4@lassitu.de> References: <338BD4B8-F25A-4CC5-A5FA-451C48BB5A5C@lassitu.de> <535A4E09.5000006@passap.ru> <CABG_4j=HydwYgJizCCwsdQD7A3-D=64YkBsb10xTsRweU7Hvqw@mail.gmail.com> <C30C335D-DCA2-4B26-A9E6-400361ABFBF4@lassitu.de>
next in thread | previous in thread | raw e-mail | index | archive | help
25.04.2014 19:35, Stefan Bethke пишет: > Am 25.04.2014 um 15:20 schrieb Robert Backhaus <robbak@robbak.com>: > >> Anyway, here's a backtrace: - but the pointed line, 1200, just looks wrong - >> >> int fd = mkstemp (LOG_FILE "-XXXXXX.log"); - checked, edited, built - Yup, that's it. Here's the patch: >> >> --- foomaticrip.c.orig 2014-04-25 23:16:06.000000000 +1000 >> +++ foomaticrip.c 2014-04-25 23:16:47.000000000 +1000 >> @@ -1197,7 +1197,7 @@ >> debug = 1; >> >> if (debug) { >> - int fd = mkstemp (LOG_FILE "-XXXXXX.log"); >> + int fd = mkstemp ("LOG_FILE-XXXXXX.log"); >> if (fd != -1) >> logh = fdopen(fd, "w"); >> else > > Sorry, that patch does’t look right to me. LOG_FILE should be a define that get’s concatenated with the string literal. Since this is compile-time, I don’t see how this would lead to a runtime error, unless LOG_FILE was defined to some unusual value. You are right, the definition is at foomaticrip.h: ----- /* This is the location of the debug logfile (and also the copy of the * processed PostScript data) in case you have enabled debugging above. * The logfile will get the extension ".log", the PostScript data ".ps". */ #ifndef LOG_FILE #define LOG_FILE "/tmp/foomatic-rip" #endif ----- Hm, was LOG_FILE defined earlier? -- WBR, Boris Samorodov (bsam) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?535A8394.4060507>