[poppler/f18] Fix loop condition in FormFieldChoice::updateSelection()

mkasik mkasik at fedoraproject.org
Tue Apr 2 11:54:55 UTC 2013


commit 33fb005b57bfae00c426fa8a1452676f47d40b9f
Author: Marek Kasik <mkasik at redhat.com>
Date:   Tue Apr 2 13:48:17 2013 +0200

    Fix loop condition in FormFieldChoice::updateSelection()

 poppler-0.20.2-fix-loop-condition.patch |   25 +++++++++++++++++++++++++
 poppler.spec                            |    8 +++++++-
 2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/poppler-0.20.2-fix-loop-condition.patch b/poppler-0.20.2-fix-loop-condition.patch
new file mode 100644
index 0000000..afe301b
--- /dev/null
+++ b/poppler-0.20.2-fix-loop-condition.patch
@@ -0,0 +1,25 @@
+From d254174e08146115ad04ac1f1bf82bb26e56c684 Mon Sep 17 00:00:00 2001
+From: Fabio D'Urso <fabiodurso at hotmail.it>
+Date: Wed, 31 Oct 2012 16:57:56 +0100
+Subject: [PATCH] FormFieldChoice::updateSelection: Fixed wrong loop condition
+
+---
+ poppler/Form.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/poppler/Form.cc b/poppler/Form.cc
+index a2be980..0940932 100644
+--- a/poppler/Form.cc
++++ b/poppler/Form.cc
+@@ -1198,7 +1198,7 @@ void FormFieldChoice::updateSelection() {
+     if (numSelected == 0) {
+       obj1.initString(new GooString(""));
+     } else if (numSelected == 1) {
+-      for (int i = 0; numChoices; i++) {
++      for (int i = 0; i < numChoices; i++) {
+         if (choices[i].optionName && choices[i].selected) {
+           obj1.initString(choices[i].optionName->copy());
+           break;
+-- 
+1.8.1.4
+
diff --git a/poppler.spec b/poppler.spec
index 0499e77..b375006 100644
--- a/poppler.spec
+++ b/poppler.spec
@@ -1,7 +1,7 @@
 Summary: PDF rendering library
 Name: poppler
 Version: 0.20.2
-Release: 14%{?dist}
+Release: 15%{?dist}
 License: (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MIT
 Group: Development/Libraries
 URL:     http://poppler.freedesktop.org/
@@ -46,6 +46,8 @@ 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
 
+Patch9: poppler-0.20.2-fix-loop-condition.patch
+
 Requires: poppler-data >= 0.4.0
 BuildRequires: automake libtool
 BuildRequires: gettext-devel
@@ -168,6 +170,7 @@ Requires: %{name}-glib%{?_isa} = %{version}-%{release}
 %patch6 -p1 -b .cairo-check
 %patch7 -p1 -b .gfxfont-check
 %patch8 -p1 -b .index-variable
+%patch9 -p1 -b .loop-condition
 
 chmod -x goo/GooTimer.h
 
@@ -292,6 +295,9 @@ test "$(pkg-config --modversion poppler-splash)" = "%{version}"
 
 
 %changelog
+* Tue Apr  2 2013 Marek Kasik <mkasik at redhat.com> 0.20.2-15
+- Fix loop condition in FormFieldChoice::updateSelection()
+
 * Tue Apr  2 2013 Marek Kasik <mkasik at redhat.com> 0.20.2-14
 - Use correct variable in FormFieldChoice::FormFieldChoice()
 - Resolves: #947426


More information about the scm-commits mailing list