--- /dev/null
+--- xpdf-2.01/xpdf/FontFile.cc.orig Fri Dec 6 00:44:32 2002
++++ xpdf-2.01/xpdf/FontFile.cc Thu Dec 26 18:38:36 2002
+@@ -18,6 +18,7 @@
+ #include <stdarg.h>
+ #include <string.h>
+ #include <ctype.h>
++#include <locale.h>
+ #include "gmem.h"
+ #include "Error.h"
+ #include "GlobalParams.h"
+@@ -358,6 +359,10 @@
+ int c, sid;
+ int i, j, n;
+
++ /* LC_NUMERIC from environment may cause writing "," as decimal dot
++ * when creating temporary fonts, leading to SEGV when trying to use them */
++ setlocale(LC_NUMERIC, "C");
++
+ outputFunc = outputFuncA;
+ outputStream = outputStreamA;
+
+@@ -614,6 +619,10 @@
+ GBool isFP;
+ int i, j, k, n;
+
++ /* LC_NUMERIC from environment may cause writing "," as decimal dot
++ * when creating temporary fonts, leading to SEGV when trying to use them */
++ setlocale(LC_NUMERIC, "C");
++
+ outputFunc = outputFuncA;
+ outputStream = outputStreamA;
+
+@@ -901,6 +910,10 @@
+ GBool isFP;
+ int i, j, n;
+
++ /* LC_NUMERIC from environment may cause writing "," as decimal dot
++ * when creating temporary fonts, leading to SEGV when trying to use them */
++ setlocale(LC_NUMERIC, "C");
++
+ outputFunc = outputFuncA;
+ outputStream = outputStreamA;
+
+@@ -2881,6 +2894,10 @@
+ void *outputStream) {
+ char buf[512];
+
++ /* LC_NUMERIC from environment may cause writing "," as decimal dot
++ * when creating temporary fonts, leading to SEGV when trying to use them */
++ setlocale(LC_NUMERIC, "C");
++
+ // write the header
+ sprintf(buf, "%%!PS-TrueTypeFont-%g\n", getFixed(0));
+ (*outputFunc)(outputStream, buf, strlen(buf));
+@@ -2915,6 +2932,10 @@
+ Gushort cid;
+ int i, j, k;
+
++ /* LC_NUMERIC from environment may cause writing "," as decimal dot
++ * when creating temporary fonts, leading to SEGV when trying to use them */
++ setlocale(LC_NUMERIC, "C");
++
+ // write the header
+ sprintf(buf, "%%!PS-TrueTypeFont-%g\n", getFixed(0));
+ (*outputFunc)(outputStream, buf, strlen(buf));
#
# Conditional build:
-# _without_protections - remove protections for printing and copying
+# _without_protections - remove protections against fair use (printing and copying)
#
Summary: Portable Document Format (PDF) file viewer
Summary(es): Visualizador de archivos PDF
Summary(ru): ðÒÏÇÒÁÍÍÁ ÄÌÑ ÐÒÏÓÍÏÔÒÁ PDF ÆÁÊÌÏ×
Summary(uk): ðÒÏÇÒÁÍÁ ÄÌÑ ÐÅÒÅÇÌÑÄÕ PDF ÆÁÊ̦×
Name: xpdf
-Version: 2.00
-Release: 3
+Version: 2.01
+Release: 1
License: GPL
Group: X11/Applications
Source0: ftp://ftp.foolabs.com/pub/xpdf/%{name}-%{version}.tar.gz
Source2: %{name}.png
Source3: %{name}rc
Patch0: %{name}-remove_protections.patch
+# official security fix
+Patch1: ftp://ftp.foolabs.com/pub/xpdf/xpdf-2.01-patch1
+Patch2: %{name}-nonumericlocale.patch
URL: http://www.foolabs.com/xpdf/
Icon: xpdfIcon.gif
BuildRequires: XFree86-devel
%prep
%setup -q
%{?_without_protections:%patch0 -p1}
+%patch2 -p1
+cd xpdf
+%patch1 -p0
%build
CXXFLAGS="%{rpmcflags} -fno-exceptions -fno-rtti"