[poppler/f18] Use correct variable in FormFieldChoice::FormFieldChoice()
mkasik
mkasik at fedoraproject.org
Tue Apr 2 11:54:50 UTC 2013
commit 0728291ff00703de022d6eb0b6dd2d9a9cc15edd
Author: Marek Kasik <mkasik at redhat.com>
Date: Tue Apr 2 13:45:13 2013 +0200
Use correct variable in FormFieldChoice::FormFieldChoice()
Resolves: #947426
poppler-0.20.2-fix-index-variable.patch | 26 ++++++++++++++++++++++++++
poppler.spec | 10 +++++++++-
2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/poppler-0.20.2-fix-index-variable.patch b/poppler-0.20.2-fix-index-variable.patch
new file mode 100644
index 0000000..a018769
--- /dev/null
+++ b/poppler-0.20.2-fix-index-variable.patch
@@ -0,0 +1,26 @@
+From 65a2555607e03c94d77ae9ebdb34ab6d4f8844b6 Mon Sep 17 00:00:00 2001
+From: Fabio D'Urso <fabiodurso at hotmail.it>
+Date: Fri, 12 Oct 2012 23:54:57 +0200
+Subject: [PATCH] FormFieldChoice ctor: Fixed wrong index variable
+
+It caused a crash if multiple items are initially selected.
+---
+ poppler/Form.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/poppler/Form.cc b/poppler/Form.cc
+index 7d32ae0..8a242c4 100644
+--- a/poppler/Form.cc
++++ b/poppler/Form.cc
+@@ -1125,7 +1125,7 @@ FormFieldChoice::FormFieldChoice(PDFDoc *docA, Object *aobj, const Ref& ref, For
+ for (int j = 0; j < obj1.arrayGetLength(); j++) {
+ Object obj2;
+
+- obj1.arrayGet(i, &obj2);
++ obj1.arrayGet(j, &obj2);
+ if (choices[i].optionName->cmp(obj2.getString()) == 0) {
+ choices[i].selected = true;
+ obj2.free();
+--
+1.8.1.4
+
diff --git a/poppler.spec b/poppler.spec
index a84fdd0..0499e77 100644
--- a/poppler.spec
+++ b/poppler.spec
@@ -1,7 +1,7 @@
Summary: PDF rendering library
Name: poppler
Version: 0.20.2
-Release: 13%{?dist}
+Release: 14%{?dist}
License: (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MIT
Group: Development/Libraries
URL: http://poppler.freedesktop.org/
@@ -43,6 +43,9 @@ Patch6: poppler-0.20.2-cairo-check.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=919055
Patch7: poppler-0.20.2-gfxfont-check.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=947426
+Patch8: poppler-0.20.2-fix-index-variable.patch
+
Requires: poppler-data >= 0.4.0
BuildRequires: automake libtool
BuildRequires: gettext-devel
@@ -164,6 +167,7 @@ Requires: %{name}-glib%{?_isa} = %{version}-%{release}
%patch5 -p1 -b .gouraud-shading
%patch6 -p1 -b .cairo-check
%patch7 -p1 -b .gfxfont-check
+%patch8 -p1 -b .index-variable
chmod -x goo/GooTimer.h
@@ -288,6 +292,10 @@ test "$(pkg-config --modversion poppler-splash)" = "%{version}"
%changelog
+* Tue Apr 2 2013 Marek Kasik <mkasik at redhat.com> 0.20.2-14
+- Use correct variable in FormFieldChoice::FormFieldChoice()
+- Resolves: #947426
+
* Thu Mar 28 2013 Marek Kasik <mkasik at redhat.com> 0.20.2-13
- Check state->getFont() for NULL in TextPage::beginWord()
- Resolves: #919055
More information about the scm-commits
mailing list