diff options
author | Till Kamppeter <till.kamppeter@gmail.com> | 2010-09-01 00:53:53 +0200 |
---|---|---|
committer | Till Kamppeter <till.kamppeter@gmail.com> | 2010-09-01 00:53:53 +0200 |
commit | 1b5500ecb863f2418792838c00b015cd1173e559 (patch) | |
tree | 390c2657187d4a8341b548d968dbe665ba9d5b96 /debian/patches/strncpy-tochar-use-isempty.patch | |
parent | 3f4753da33ee6cff487a80eca4b77e097ae9265f (diff) |
Added two patches to fix some segfaults in 4.0.5.
Diffstat (limited to 'debian/patches/strncpy-tochar-use-isempty.patch')
-rw-r--r-- | debian/patches/strncpy-tochar-use-isempty.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/debian/patches/strncpy-tochar-use-isempty.patch b/debian/patches/strncpy-tochar-use-isempty.patch new file mode 100644 index 0000000..7fb83ac --- /dev/null +++ b/debian/patches/strncpy-tochar-use-isempty.patch @@ -0,0 +1,69 @@ +=== modified file 'ChangeLog' +--- foomatic-filters/ChangeLog 2010-08-10 10:06:19 +0000 ++++ foomatic-filters/ChangeLog 2010-08-27 18:01:04 +0000 +@@ -1,3 +1,8 @@ ++2010-08-27 Till Kamppeter <till.kamppeter@gmail.com> ++ ++ * util.c: In strncpy_tochar() use the isempty() function to check ++ whether the input string is empty (bug #514). ++ + 2010-08-10 Till Kamppeter <till.kamppeter@gmail.com> + + * Tagged branch for release 4.0.5. +@@ -10,34 +15,36 @@ + page size in the prototype string for the custom page size + working. Before, only substitution of %0 and %1 worked reliably. + Thanks to Lutz Sammer (johns98 at web dot de) for reporting this +- problem. ++ problem (see also bug 514, comment #1). + + * options.c: Make custom page size settings also work if the custom + size is set via embedded PostScript code and the comment to mark + the selected option setting is only "%% FoomaticRIPOptionSetting: + PageSize=Custom", without the size and unit parameters. Thanks to +- Lutz Sammer for reporting this problem. ++ Lutz Sammer for reporting this problem (see also bug 514, comment #1). + + 2010-07-02 Till Kamppeter <till.kamppeter@gmail.com> + + * spooler.c: Config file for the default printer in spooler-less + (direct) printing mode was not read correctly. Thanks to Lutz +- Sammer (johns98 at web dot de) for reporting this problem. ++ Sammer (johns98 at web dot de) for reporting this problem (see ++ also bug 514, comment #1). + + * spooler.c: Fixed error message output if a printer's PPD is missing + in spooler-less mode. There was a segfault due to the printer name + not specified in the _log() function call. Thanks to Lutz Sammer +- for reporting this problem. ++ for reporting this problem (see also bug 514, comment #1). + + * util.c: The isempty() function did not consider NULL as an empty + string. This caused segfaults when a string is considered non-empty + but in fact it is NULL. Thanks to Lutz Sammer for reporting this +- problem. ++ problem (see also bug 514, comment #1). + + * util.c: strncpy_tochar() did not check whether the input string + is empty and returned a pointer one character beyond the input + string, leading to segfaults in the code calling this function. +- Thanks to Lutz Sammer for reporting this problem. ++ Thanks to Lutz Sammer for reporting this problem (see also bug 514, ++ comment #1). + + 2010-06-08 Till Kamppeter <till.kamppeter@gmail.com> + + +=== modified file 'util.c' +--- foomatic-filters/util.c 2010-07-02 15:57:09 +0000 ++++ foomatic-filters/util.c 2010-08-27 18:01:04 +0000 +@@ -272,7 +272,7 @@ + { + const char *psrc = src; + char *pdest = dest; +- if (!*psrc) { ++ if (isempty(psrc)) { + return NULL; + } + while (*psrc && --max > 0 && !strchr(stopchars, *psrc)) { + |