Hello community,

here is the log from the commit of package cups-filters for openSUSE:Factory 
checked in at 2014-04-08 22:36:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cups-filters (Old)
 and      /work/SRC/openSUSE:Factory/.cups-filters.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cups-filters"

Changes:
--------
--- /work/SRC/openSUSE:Factory/cups-filters/cups-filters.changes        
2014-04-03 16:49:55.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.cups-filters.new/cups-filters.changes   
2014-04-08 22:36:58.000000000 +0200
@@ -1,0 +2,10 @@
+Tue Apr  8 17:01:36 CEST 2014 - [email protected]
+
+- Version upgrade to 1.0.52
+  Changes in 1.0.52 (excerpt):
+  * texttopdf, imagetopdf, imagetoraster:
+    Range-check paper dimensions and margins taken
+    from the PPD file and correct them if needed, see
+    https://bugs.linuxfoundation.org/show_bug.cgi?id=1195
+
+-------------------------------------------------------------------

Old:
----
  cups-filters-1.0.51.tar.gz

New:
----
  cups-filters-1.0.52.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cups-filters.spec ++++++
--- /var/tmp/diff_new_pack.xDmhfa/_old  2014-04-08 22:36:59.000000000 +0200
+++ /var/tmp/diff_new_pack.xDmhfa/_new  2014-04-08 22:36:59.000000000 +0200
@@ -15,7 +15,6 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
-
 Summary:        OpenPrinting CUPS filters, backends, and cups-browsed
 License:        GPL-2.0 and GPL-2.0+ and GPL-3.0 and MIT
 Group:          Hardware/Printing
@@ -36,7 +35,7 @@
 #       and also run: zypper vcmp 'next version' 'current version'
 # e.g. zypper vcmp '1.0.49' '1.0.49.20140326' -> 1.0.49 is older than 
1.0.49.20140326
 #  and zypper vcmp '1.0.50' '1.0.49.20140326' -> 1.0.50 is newer than 
1.0.49.20140326
-Version:        1.0.51
+Version:        1.0.52
 Release:        0
 # tarball_version is used below to specify the directory via "setup -n":
 # Special tarball_version needed for current cups-filters e.g. "define 
tarball_version 9.10rc1".

++++++ cups-filters-1.0.51.tar.gz -> cups-filters-1.0.52.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cups-filters-1.0.51/INSTALL 
new/cups-filters-1.0.52/INSTALL
--- old/cups-filters-1.0.51/INSTALL     2014-04-02 02:15:21.000000000 +0200
+++ new/cups-filters-1.0.52/INSTALL     2014-04-07 21:56:59.000000000 +0200
@@ -1,4 +1,4 @@
-INSTALL - OpenPrinting CUPS Filters v1.0.51 - 2014-04-02
+INSTALL - OpenPrinting CUPS Filters v1.0.52 - 2014-04-07
 --------------------------------------------------------
 
 This file describes how to compile and install OpenPrinting CUPS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cups-filters-1.0.51/NEWS new/cups-filters-1.0.52/NEWS
--- old/cups-filters-1.0.51/NEWS        2014-04-02 02:14:38.000000000 +0200
+++ new/cups-filters-1.0.52/NEWS        2014-04-07 21:56:31.000000000 +0200
@@ -1,6 +1,14 @@
-NEWS - OpenPrinting CUPS Filters v1.0.51 - 2014-04-02
+NEWS - OpenPrinting CUPS Filters v1.0.52 - 2014-04-07
 -----------------------------------------------------
 
+CHANGES IN V1.0.52
+
+       - texttopdf: Make sure that margin changes for prettyprint
+         get applied.
+       - texttopdf, imagetopdf, imagetoraster: Range-check paper
+         dimensions and margins taken from the PPD file and correct
+         them if needed (Bug #1195).
+
 CHANGES IN V1.0.51
 
        - cups-browsed: SECURITY FIX to prevent arbitrary code
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cups-filters-1.0.51/README 
new/cups-filters-1.0.52/README
--- old/cups-filters-1.0.51/README      2014-04-02 02:14:57.000000000 +0200
+++ new/cups-filters-1.0.52/README      2014-04-07 21:56:44.000000000 +0200
@@ -1,4 +1,4 @@
-README - OpenPrinting CUPS Filters v1.0.51 - 2014-04-02
+README - OpenPrinting CUPS Filters v1.0.52 - 2014-04-07
 -------------------------------------------------------
 
 Looking for compile instructions?  Read the file "INSTALL.txt"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cups-filters-1.0.51/configure 
new/cups-filters-1.0.52/configure
--- old/cups-filters-1.0.51/configure   2014-04-02 02:18:44.000000000 +0200
+++ new/cups-filters-1.0.52/configure   2014-04-07 21:58:39.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for cups-filters 1.0.51.
+# Generated by GNU Autoconf 2.69 for cups-filters 1.0.52.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@
 # Identity of this package.
 PACKAGE_NAME='cups-filters'
 PACKAGE_TARNAME='cups-filters'
-PACKAGE_VERSION='1.0.51'
-PACKAGE_STRING='cups-filters 1.0.51'
+PACKAGE_VERSION='1.0.52'
+PACKAGE_STRING='cups-filters 1.0.52'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1438,7 +1438,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures cups-filters 1.0.51 to adapt to many kinds of systems.
+\`configure' configures cups-filters 1.0.52 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1508,7 +1508,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of cups-filters 1.0.51:";;
+     short | recursive ) echo "Configuration of cups-filters 1.0.52:";;
    esac
   cat <<\_ACEOF
 
@@ -1698,7 +1698,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-cups-filters configure 1.0.51
+cups-filters configure 1.0.52
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2305,7 +2305,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by cups-filters $as_me 1.0.51, which was
+It was created by cups-filters $as_me 1.0.52, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3256,7 +3256,7 @@
 
 # Define the identity of the package.
  PACKAGE='cups-filters'
- VERSION='1.0.51'
+ VERSION='1.0.52'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -19331,7 +19331,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by cups-filters $as_me 1.0.51, which was
+This file was extended by cups-filters $as_me 1.0.52, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -19397,7 +19397,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-cups-filters config.status 1.0.51
+cups-filters config.status 1.0.52
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cups-filters-1.0.51/configure.ac 
new/cups-filters-1.0.52/configure.ac
--- old/cups-filters-1.0.51/configure.ac        2014-04-02 02:15:38.000000000 
+0200
+++ new/cups-filters-1.0.52/configure.ac        2014-04-07 21:57:15.000000000 
+0200
@@ -7,7 +7,7 @@
 # ====================
 m4_define([cups_filters_version_major],[1])
 m4_define([cups_filters_version_minor],[0])
-m4_define([cups_filters_version_micro],[51])
+m4_define([cups_filters_version_micro],[52])
 
m4_define([cups_filters_version],[cups_filters_version_major.cups_filters_version_minor.cups_filters_version_micro])
 
 # =============
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cups-filters-1.0.51/filter/common.c 
new/cups-filters-1.0.52/filter/common.c
--- old/cups-filters-1.0.51/filter/common.c     2013-12-10 22:20:15.000000000 
+0100
+++ new/cups-filters-1.0.52/filter/common.c     2014-04-07 16:23:35.000000000 
+0200
@@ -76,15 +76,121 @@
 
   if ((pagesize = ppdPageSize(ppd, NULL)) != NULL)
   {
-    PageWidth  = pagesize->width;
-    PageLength = pagesize->length;
-    PageTop    = pagesize->top;
-    PageBottom = pagesize->bottom;
-    PageLeft   = pagesize->left;
-    PageRight  = pagesize->right;
+    int corrected = 0;
+    if (pagesize->width > 0) 
+      PageWidth = pagesize->width;
+    else
+    {
+      fprintf(stderr, "ERROR: Invalid value for page width: %.0f\n",
+             pagesize->width);
+      corrected = 1;
+    }
+    if (pagesize->length > 0) 
+      PageLength = pagesize->length;
+    else
+    {
+      fprintf(stderr, "ERROR: Invalid value for page length: %.0f\n",
+             pagesize->length);
+      corrected = 1;
+    }
+    if (pagesize->top >= 0 && pagesize->top <= PageLength) 
+      PageTop = pagesize->top;
+    else
+    {
+      fprintf(stderr, "ERROR: Invalid value for page top margin: %.0f\n",
+             pagesize->top);
+      if (PageLength >= PageBottom)
+       PageTop = PageLength - PageBottom;
+      else
+       PageTop = PageLength;
+      corrected = 1;
+    }
+    if (pagesize->bottom >= 0 && pagesize->bottom <= PageLength) 
+      PageBottom = pagesize->bottom;
+    else
+    {
+      fprintf(stderr, "ERROR: Invalid value for page bottom margin: %.0f\n",
+             pagesize->bottom);
+      if (PageLength <= PageBottom)
+       PageBottom = 0.0f;
+      corrected = 1;
+    }
+    if (PageBottom == PageTop)
+    {
+      fprintf(stderr, "ERROR: Invalid values for page margins: Bottom: %.0f; 
Top: %.0f\n",
+             PageBottom, PageTop);
+      PageTop = PageLength - PageBottom;
+      if (PageBottom == PageTop)
+      {
+       PageBottom = 0.0f;
+       PageTop = PageLength;
+      }
+      corrected = 1;
+    }
+    if (PageBottom > PageTop)
+    {
+      fprintf(stderr, "ERROR: Invalid values for page margins: Bottom: %.0f; 
Top: %.0f\n",
+             PageBottom, PageTop);
+      float swap = PageBottom;
+      PageBottom = PageTop;
+      PageTop = swap;
+      corrected = 1;
+    }
 
-    fprintf(stderr, "DEBUG: Page = %.0fx%.0f; %.0f,%.0f to %.0f,%.0f\n",
-            PageWidth, PageLength, PageLeft, PageBottom, PageRight, PageTop);
+    if (pagesize->left >= 0 && pagesize->left <= PageWidth) 
+      PageLeft = pagesize->left;
+    else
+    {
+      fprintf(stderr, "ERROR: Invalid value for page left margin: %.0f\n",
+             pagesize->left);
+      if (PageWidth <= PageLeft)
+       PageLeft = 0.0f;
+      corrected = 1;
+    }
+    if (pagesize->right >= 0 && pagesize->right <= PageWidth) 
+      PageRight = pagesize->right;
+    else
+    {
+      fprintf(stderr, "ERROR: Invalid value for page right margin: %.0f\n",
+             pagesize->right);
+      if (PageWidth >= PageLeft)
+       PageRight = PageWidth - PageLeft;
+      else
+       PageRight = PageWidth;
+      corrected = 1;
+    }
+    if (PageLeft == PageRight)
+    {
+      fprintf(stderr, "ERROR: Invalid values for page margins: Left: %.0f; 
Right: %.0f\n",
+             PageLeft, PageRight);
+      PageRight = PageWidth - PageLeft;
+      if (PageLeft == PageRight)
+      {
+       PageLeft = 0.0f;
+       PageRight = PageWidth;
+      }
+      corrected = 1;
+    }
+    if (PageLeft > PageRight)
+    {
+      fprintf(stderr, "ERROR: Invalid values for page margins: Left: %.0f; 
Right: %.0f\n",
+             PageLeft, PageRight);
+      float swap = PageLeft;
+      PageLeft = PageRight;
+      PageRight = swap;
+      corrected = 1;
+    }
+
+    if (corrected)
+    {
+      fprintf(stderr, "ERROR: PPD Page = %.0fx%.0f; %.0f,%.0f to %.0f,%.0f\n",
+             pagesize->width, pagesize->length, pagesize->left, 
pagesize->bottom, pagesize->right, pagesize->top);
+      fprintf(stderr, "ERROR: Corrected Page = %.0fx%.0f; %.0f,%.0f to 
%.0f,%.0f\n",
+             PageWidth, PageLength, PageLeft, PageBottom, PageRight, PageTop);
+    }
+    else
+      fprintf(stderr, "DEBUG: Page = %.0fx%.0f; %.0f,%.0f to %.0f,%.0f\n",
+             pagesize->width, pagesize->length, pagesize->left, 
pagesize->bottom, pagesize->right, pagesize->top);
   }
 
   if (ppd != NULL)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cups-filters-1.0.51/filter/textcommon.c 
new/cups-filters-1.0.52/filter/textcommon.c
--- old/cups-filters-1.0.51/filter/textcommon.c 2013-12-10 22:20:15.000000000 
+0100
+++ new/cups-filters-1.0.52/filter/textcommon.c 2014-04-07 16:40:24.000000000 
+0200
@@ -545,6 +545,8 @@
   options     = NULL;
   num_options = cupsParseOptions(argv[5], 0, &options);
 
+  ppd = SetCommonOptions(num_options, options, 1);
+
   if ((val = cupsGetOption("prettyprint", num_options, options)) != NULL &&
       strcasecmp(val, "no") && strcasecmp(val, "off") &&
       strcasecmp(val, "false"))
@@ -594,8 +596,6 @@
     }
   }
 
-  ppd = SetCommonOptions(num_options, options, 1);
-
   if ((val = cupsGetOption("wrap", num_options, options)) == NULL)
     WrapLines = 1;
   else

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to