Hello community,

here is the log from the commit of package poppler for 
openSUSE:12.1:Update:Test checked in at 2012-03-16 12:43:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.1:Update:Test/poppler (Old)
 and      /work/SRC/openSUSE:12.1:Update:Test/.poppler.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "poppler", Maintainer is "b...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:12.1:Update:Test/poppler/poppler-qt.changes      
2012-03-16 12:43:12.000000000 +0100
+++ /work/SRC/openSUSE:12.1:Update:Test/.poppler.new/poppler-qt.changes 
2012-03-16 12:43:13.000000000 +0100
@@ -1,0 +2,6 @@
+Fri Mar  2 08:26:13 UTC 2012 - vu...@opensuse.org
+
+- Add poppler-broken-hints-table.patch: fix wrong page order in
+  some PDF files (bnc#748257, fdo#46459).
+
+-------------------------------------------------------------------
poppler.changes: same change

New:
----
  poppler-broken-hints-table.patch

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

Other differences:
------------------
++++++ poppler-qt.spec ++++++
--- /var/tmp/diff_new_pack.tN2YnZ/_old  2012-03-16 12:43:13.000000000 +0100
+++ /var/tmp/diff_new_pack.tN2YnZ/_new  2012-03-16 12:43:13.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package poppler-qt
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -21,7 +21,7 @@
 Name:           poppler-qt
 %define _name   poppler
 Version:        0.18.0
-Release:        1
+Release:        0
 # Actual version of poppler-data:
 %define poppler_data_version 0.2.1
 %define poppler_soname 18
@@ -30,12 +30,14 @@
 %define poppler_qt4_soname 3
 %define poppler_api 0.18
 Url:            http://poppler.freedesktop.org/
-Group:          System/Libraries
-License:        GPLv2+
 Summary:        PDF Rendering Library
+License:        GPL-2.0+
+Group:          System/Libraries
 Source:         http://poppler.freedesktop.org/%{_name}-%{version}.tar.gz
-BuildRequires:  gobject-introspection-devel
+# PATCH-FIX-UPSTREAM poppler-broken-hints-table.patch bnc#748257 fdo#46459 
vu...@opensuse.org -- Fix wrong page order in some PDF files
+Patch0:         poppler-broken-hints-table.patch
 BuildRequires:  gcc-c++
+BuildRequires:  gobject-introspection-devel
 BuildRequires:  libjpeg-devel
 BuildRequires:  libtiff-devel
 %if %build_qt
@@ -57,9 +59,9 @@
 
 %package -n libpoppler%{poppler_soname}
 
-License:        GPLv2
-Group:          System/Libraries
 Summary:        PDF Rendering Library
+License:        GPL-2.0
+Group:          System/Libraries
 # Last appeared in OpenSUSE 10.3:
 Provides:       poppler = %{version}
 Obsoletes:      poppler < %{version}
@@ -70,18 +72,18 @@
 developed by Derek Noonburg of Glyph and Cog, LLC.
 
 %package -n libpoppler-cpp%{poppler_cpp_soname}
-License:        GPLv2
-Group:          System/Libraries
 Summary:        PDF Rendering Library
+License:        GPL-2.0
+Group:          System/Libraries
 
 %description -n libpoppler-cpp%{poppler_cpp_soname}
 Poppler is a PDF rendering library, forked from the xpdf PDF viewer
 developed by Derek Noonburg of Glyph and Cog, LLC.
 
 %package -n libpoppler-glib%{poppler_glib_soname}
-License:        GPLv2+
-Group:          System/Libraries
 Summary:        PDF Rendering Library - GLib Wrapper
+License:        GPL-2.0+
+Group:          System/Libraries
 Requires:       libpoppler%{poppler_soname} >= %{version}
 # Last appeared in OpenSUSE 10.3:
 Provides:       poppler-glib = %{version}
@@ -94,9 +96,9 @@
 %if %build_qt
 
 %package -n libpoppler-qt4-%{poppler_qt4_soname}
-License:        GPLv2+
-Group:          System/Libraries
 Summary:        PDF Rendering Library - Qt4 Wrapper
+License:        GPL-2.0+
+Group:          System/Libraries
 Requires:       libpoppler%{poppler_soname} >= %{version}
 # Last appeared in OpenSUSE 10.3:
 Provides:       poppler-qt4 = %{version}
@@ -108,9 +110,9 @@
 %endif
 
 %package tools
-License:        GPLv2
-Group:          Productivity/Publishing/PDF
 Summary:        PDF Rendering Library Tools
+License:        GPL-2.0
+Group:          Productivity/Publishing/PDF
 Requires:       libpoppler%{poppler_soname} >= %{version}
 # last version in openSUSE 11.1/SLE11
 Provides:       xpdf-tools = 3.02
@@ -122,9 +124,9 @@
 developed by Derek Noonburg of Glyph and Cog, LLC.
 
 %package -n libpoppler-devel
-License:        GPLv2
-Group:          Development/Libraries/C and C++
 Summary:        PDF rendering library
+License:        GPL-2.0
+Group:          Development/Libraries/C and C++
 Requires:       libpoppler%{poppler_soname} = %{version}
 Requires:       libstdc++-devel
 # Last appeared in OpenSUSE 10.3:
@@ -136,9 +138,9 @@
 developed by Derek Noonburg of Glyph and Cog, LLC.
 
 %package -n libpoppler-glib-devel
-License:        GPLv2
-Group:          Development/Libraries/C and C++
 Summary:        PDF rendering library - GLib Wrapper
+License:        GPL-2.0
+Group:          Development/Libraries/C and C++
 Requires:       libpoppler-glib%{poppler_glib_soname} = %{version}
 # Last appeared in OpenSUSE 10.3:
 Provides:       poppler-devel:%{_libdir}/libpoppler-glib.so
@@ -156,9 +158,9 @@
 %if %build_qt
 
 %package -n libpoppler-qt4-devel
-License:        GPLv2+
-Group:          Development/Libraries/C and C++
 Summary:        PDF rendering library - Qt4 Wrapper
+License:        GPL-2.0+
+Group:          Development/Libraries/C and C++
 Requires:       libpoppler-devel = %{version}
 Requires:       libpoppler-qt4-%{poppler_qt4_soname} = %{version}
 Requires:       libqt4-devel
@@ -172,6 +174,7 @@
 
 %prep
 %setup -q -n poppler-%{version}
+%patch0 -p1
 
 %build
 %configure\

++++++ poppler.spec ++++++
--- /var/tmp/diff_new_pack.tN2YnZ/_old  2012-03-16 12:43:13.000000000 +0100
+++ /var/tmp/diff_new_pack.tN2YnZ/_new  2012-03-16 12:43:13.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package poppler
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -21,7 +21,7 @@
 Name:           poppler
 %define _name   poppler
 Version:        0.18.0
-Release:        1
+Release:        0
 # Actual version of poppler-data:
 %define poppler_data_version 0.2.1
 %define poppler_soname 18
@@ -30,12 +30,14 @@
 %define poppler_qt4_soname 3
 %define poppler_api 0.18
 Url:            http://poppler.freedesktop.org/
-Group:          System/Libraries
-License:        GPLv2+
 Summary:        PDF Rendering Library
+License:        GPL-2.0+
+Group:          System/Libraries
 Source:         http://poppler.freedesktop.org/%{_name}-%{version}.tar.gz
-BuildRequires:  gobject-introspection-devel
+# PATCH-FIX-UPSTREAM poppler-broken-hints-table.patch bnc#748257 fdo#46459 
vu...@opensuse.org -- Fix wrong page order in some PDF files
+Patch0:         poppler-broken-hints-table.patch
 BuildRequires:  gcc-c++
+BuildRequires:  gobject-introspection-devel
 BuildRequires:  libjpeg-devel
 BuildRequires:  libtiff-devel
 %if %build_qt
@@ -57,9 +59,9 @@
 
 %package -n libpoppler%{poppler_soname}
 
-License:        GPLv2
-Group:          System/Libraries
 Summary:        PDF Rendering Library
+License:        GPL-2.0
+Group:          System/Libraries
 # Last appeared in OpenSUSE 10.3:
 Provides:       poppler = %{version}
 Obsoletes:      poppler < %{version}
@@ -70,18 +72,18 @@
 developed by Derek Noonburg of Glyph and Cog, LLC.
 
 %package -n libpoppler-cpp%{poppler_cpp_soname}
-License:        GPLv2
-Group:          System/Libraries
 Summary:        PDF Rendering Library
+License:        GPL-2.0
+Group:          System/Libraries
 
 %description -n libpoppler-cpp%{poppler_cpp_soname}
 Poppler is a PDF rendering library, forked from the xpdf PDF viewer
 developed by Derek Noonburg of Glyph and Cog, LLC.
 
 %package -n libpoppler-glib%{poppler_glib_soname}
-License:        GPLv2+
-Group:          System/Libraries
 Summary:        PDF Rendering Library - GLib Wrapper
+License:        GPL-2.0+
+Group:          System/Libraries
 Requires:       libpoppler%{poppler_soname} >= %{version}
 # Last appeared in OpenSUSE 10.3:
 Provides:       poppler-glib = %{version}
@@ -94,9 +96,9 @@
 %if %build_qt
 
 %package -n libpoppler-qt4-%{poppler_qt4_soname}
-License:        GPLv2+
-Group:          System/Libraries
 Summary:        PDF Rendering Library - Qt4 Wrapper
+License:        GPL-2.0+
+Group:          System/Libraries
 Requires:       libpoppler%{poppler_soname} >= %{version}
 # Last appeared in OpenSUSE 10.3:
 Provides:       poppler-qt4 = %{version}
@@ -108,9 +110,9 @@
 %endif
 
 %package tools
-License:        GPLv2
-Group:          Productivity/Publishing/PDF
 Summary:        PDF Rendering Library Tools
+License:        GPL-2.0
+Group:          Productivity/Publishing/PDF
 Requires:       libpoppler%{poppler_soname} >= %{version}
 # last version in openSUSE 11.1/SLE11
 Provides:       xpdf-tools = 3.02
@@ -122,9 +124,9 @@
 developed by Derek Noonburg of Glyph and Cog, LLC.
 
 %package -n libpoppler-devel
-License:        GPLv2
-Group:          Development/Libraries/C and C++
 Summary:        PDF rendering library
+License:        GPL-2.0
+Group:          Development/Libraries/C and C++
 Requires:       libpoppler%{poppler_soname} = %{version}
 Requires:       libstdc++-devel
 # Last appeared in OpenSUSE 10.3:
@@ -136,9 +138,9 @@
 developed by Derek Noonburg of Glyph and Cog, LLC.
 
 %package -n libpoppler-glib-devel
-License:        GPLv2
-Group:          Development/Libraries/C and C++
 Summary:        PDF rendering library - GLib Wrapper
+License:        GPL-2.0
+Group:          Development/Libraries/C and C++
 Requires:       libpoppler-glib%{poppler_glib_soname} = %{version}
 # Last appeared in OpenSUSE 10.3:
 Provides:       poppler-devel:%{_libdir}/libpoppler-glib.so
@@ -156,9 +158,9 @@
 %if %build_qt
 
 %package -n libpoppler-qt4-devel
-License:        GPLv2+
-Group:          Development/Libraries/C and C++
 Summary:        PDF rendering library - Qt4 Wrapper
+License:        GPL-2.0+
+Group:          Development/Libraries/C and C++
 Requires:       libpoppler-devel = %{version}
 Requires:       libpoppler-qt4-%{poppler_qt4_soname} = %{version}
 Requires:       libqt4-devel
@@ -172,6 +174,7 @@
 
 %prep
 %setup -q -n poppler-%{version}
+%patch0 -p1
 
 %build
 %configure\

++++++ poppler-broken-hints-table.patch ++++++
>From c9780f867ee62c388483829c4e16804045567c87 Mon Sep 17 00:00:00 2001
From: Hib Eris <h...@hiberis.nl>
Date: Tue, 28 Feb 2012 11:38:07 +0100
Subject: [PATCH] [Backported to 0.18.4] Only use Hints table when there are
 no parse errors

Fixes bug #46459.

Backported to 0.18.4 from: 81fde76643e6cd9114ae92d22704fbc405a02974
---
 poppler/Hints.cc  |    5 ++++-
 poppler/Parser.cc |   29 +++++++++++++++++++++++------
 poppler/Parser.h  |    6 ++++--
 3 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/poppler/Hints.cc b/poppler/Hints.cc
index 4f0c959..e76ffca 100644
--- a/poppler/Hints.cc
+++ b/poppler/Hints.cc
@@ -60,6 +60,8 @@ Hints::Hints(BaseStream *str, Linearization *linearization, 
XRef *xref, Security
     nPages = 0;
   }
 
+  memset(pageLength, 0, nPages * sizeof(Guint));
+  memset(pageOffset, 0, nPages * sizeof(Guint));
   memset(numSharedObject, 0, nPages * sizeof(Guint));
   memset(pageObjectNum, 0, nPages * sizeof(int));
 
@@ -131,6 +133,7 @@ void Hints::readTables(BaseStream *str, Linearization 
*linearization, XRef *xref
   parser = new Parser(xref, new Lexer(xref, memStream), gTrue);
 
   int num, gen;
+  std::set<int> fetchOriginatorNums;
   if (parser->getObj(&obj)->isInt() &&
      (num = obj.getInt(), obj.free(), parser->getObj(&obj)->isInt()) &&
      (gen = obj.getInt(), obj.free(), parser->getObj(&obj)->isCmd("obj")) &&
@@ -138,7 +141,7 @@ void Hints::readTables(BaseStream *str, Linearization 
*linearization, XRef *xref
          secHdlr ? secHdlr->getFileKey() : (Guchar *)NULL,
          secHdlr ? secHdlr->getEncAlgorithm() : cryptRC4,
          secHdlr ? secHdlr->getFileKeyLength() : 0,
-         num, gen)->isStream())) {
+         num, gen, &fetchOriginatorNums, gTrue)->isStream())) {
     Stream *hintsStream = obj.getStream();
     Dict *hintsDict = obj.streamGetDict();
 
diff --git a/poppler/Parser.cc b/poppler/Parser.cc
index 34a8286..8bf820b 100644
--- a/poppler/Parser.cc
+++ b/poppler/Parser.cc
@@ -66,7 +66,8 @@ Object *Parser::getObj(Object *obj, std::set<int> 
*fetchOriginatorNums)
 
 Object *Parser::getObj(Object *obj, Guchar *fileKey,
                       CryptAlgorithm encAlgorithm, int keyLength,
-                      int objNum, int objGen, std::set<int> 
*fetchOriginatorNums) {
+                      int objNum, int objGen, std::set<int> 
*fetchOriginatorNums,
+                      GBool strict) {
   char *key;
   Stream *str;
   Object obj2;
@@ -91,8 +92,10 @@ Object *Parser::getObj(Object *obj, Guchar *fileKey,
     while (!buf1.isCmd("]") && !buf1.isEOF())
       obj->arrayAdd(getObj(&obj2, fileKey, encAlgorithm, keyLength,
                           objNum, objGen, fetchOriginatorNums));
-    if (buf1.isEOF())
+    if (buf1.isEOF()) {
       error(getPos(), "End of file inside array");
+      if (strict) goto err;
+    }
     shift();
 
   // dictionary or stream
@@ -102,6 +105,7 @@ Object *Parser::getObj(Object *obj, Guchar *fileKey,
     while (!buf1.isCmd(">>") && !buf1.isEOF()) {
       if (!buf1.isName()) {
        error(getPos(), "Dictionary key must be a name object");
+       if (strict) goto err;
        shift();
       } else {
        // buf1 might go away in shift(), so construct the key
@@ -109,18 +113,22 @@ Object *Parser::getObj(Object *obj, Guchar *fileKey,
        shift();
        if (buf1.isEOF() || buf1.isError()) {
          gfree(key);
+         if (strict && buf1.isError()) goto err;
          break;
        }
        obj->dictAdd(key, getObj(&obj2, fileKey, encAlgorithm, keyLength, 
objNum, objGen, fetchOriginatorNums));
       }
     }
-    if (buf1.isEOF())
+    if (buf1.isEOF()) {
       error(getPos(), "End of file inside dictionary");
+      if (strict) goto err;
+    }
     // stream objects are not allowed inside content streams or
     // object streams
     if (allowStreams && buf2.isCmd("stream")) {
       if ((str = makeStream(obj, fileKey, encAlgorithm, keyLength,
-                           objNum, objGen, fetchOriginatorNums))) {
+                           objNum, objGen, fetchOriginatorNums,
+                           strict))) {
        obj->initStream(str);
       } else {
        obj->free();
@@ -170,11 +178,18 @@ Object *Parser::getObj(Object *obj, Guchar *fileKey,
   }
 
   return obj;
+
+err:
+  obj->free();
+  obj->initError();
+  return obj;
+
 }
 
 Stream *Parser::makeStream(Object *dict, Guchar *fileKey,
                           CryptAlgorithm encAlgorithm, int keyLength,
-                          int objNum, int objGen, std::set<int> 
*fetchOriginatorNums) {
+                          int objNum, int objGen, std::set<int> 
*fetchOriginatorNums,
+                          GBool strict) {
   Object obj;
   BaseStream *baseStr;
   Stream *str;
@@ -192,6 +207,7 @@ Stream *Parser::makeStream(Object *dict, Guchar *fileKey,
   } else {
     error(getPos(), "Bad 'Length' attribute in stream");
     obj.free();
+    if (strict) return NULL;
     length = 0;
   }
 
@@ -221,7 +237,8 @@ Stream *Parser::makeStream(Object *dict, Guchar *fileKey,
   if (buf1.isCmd("endstream")) {
     shift();
   } else {
-    error(getPos(), "Missing 'endstream'");
+    error(getPos(), "Missing 'endstream' or incorrect stream length");
+    if (strict) return NULL;
     if (xref) {
       // shift until we find the proper endstream or we change to another 
object or reach eof
       while (!buf1.isCmd("endstream") && xref->getNumEntry(lexer->getPos()) == 
objNum && !buf1.isEOF()) {
diff --git a/poppler/Parser.h b/poppler/Parser.h
index 3d8a831..4fb3330 100644
--- a/poppler/Parser.h
+++ b/poppler/Parser.h
@@ -49,7 +49,8 @@ public:
   
   Object *getObj(Object *obj, Guchar *fileKey,
      CryptAlgorithm encAlgorithm, int keyLength,
-     int objNum, int objGen, std::set<int> *fetchOriginatorNums);
+     int objNum, int objGen, std::set<int> *fetchOriginatorNums,
+     GBool strict = gFalse);
 
   Object *getObj(Object *obj, std::set<int> *fetchOriginatorNums);
 
@@ -69,7 +70,8 @@ private:
 
   Stream *makeStream(Object *dict, Guchar *fileKey,
                     CryptAlgorithm encAlgorithm, int keyLength,
-                    int objNum, int objGen, std::set<int> 
*fetchOriginatorNums);
+                    int objNum, int objGen, std::set<int> *fetchOriginatorNums,
+                    GBool strict);
   void shift(int objNum = -1);
 };
 
-- 
1.7.7

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to