- Fix the infinite loop in splitting paragraphs (#618483)
This commit is contained in:
parent
42a36f5857
commit
bd0b84e12d
31
paps-fix-loop-in-split.patch
Normal file
31
paps-fix-loop-in-split.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 6c3fa9959dd454938378ade2fec8e84cee7d6916 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Akira TAGOH <tagoh@redhat.com>
|
||||||
|
Date: Tue, 27 Jul 2010 12:19:30 +0900
|
||||||
|
Subject: [PATCH 1/2] Fix rhbz#618483: texttopaps becoms runaway memory hog
|
||||||
|
|
||||||
|
* src/paps.c (split_text_into_paragraphs): fix a infinite loop
|
||||||
|
when non-printable characters are in the text.
|
||||||
|
---
|
||||||
|
src/paps.c | 5 ++++-
|
||||||
|
1 files changed, 4 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
* paps.c: Erased --justify option since it is not implemented in
|
||||||
|
diff --git a/src/paps.c b/src/paps.c
|
||||||
|
index 72dbaad..dcef349 100644
|
||||||
|
--- a/src/paps.c
|
||||||
|
+++ b/src/paps.c
|
||||||
|
@@ -835,7 +835,10 @@ split_text_into_paragraphs (PangoContext *pango_context,
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
for (i = 0; i < len; i++) {
|
||||||
|
- wwidth += wcwidth(wtext[i]);
|
||||||
|
+ gssize w = wcwidth(wtext[i]);
|
||||||
|
+
|
||||||
|
+ if (w >= 0)
|
||||||
|
+ wwidth += w;
|
||||||
|
if (wwidth > col)
|
||||||
|
break;
|
||||||
|
wnewtext[i] = wtext[i];
|
||||||
|
--
|
||||||
|
1.7.1.1
|
||||||
|
|
57
paps.spec
57
paps.spec
@ -1,46 +1,47 @@
|
|||||||
Name: paps
|
Name: paps
|
||||||
Version: 0.6.8
|
Version: 0.6.8
|
||||||
Release: 13%{?dist}
|
Release: 14%{?dist}
|
||||||
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://paps.sourceforge.net/
|
URL: http://paps.sourceforge.net/
|
||||||
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
||||||
Source1: paps.convs
|
Source1: paps.convs
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: pango-devel automake autoconf libtool doxygen cups-devel
|
BuildRequires: pango-devel automake autoconf libtool doxygen cups-devel
|
||||||
## https://sourceforge.net/tracker/index.php?func=detail&aid=1832897&group_id=153049&atid=786241
|
## https://sourceforge.net/tracker/index.php?func=detail&aid=1832897&group_id=153049&atid=786241
|
||||||
Patch0: paps-0.6.8-shared.patch
|
Patch0: paps-0.6.8-shared.patch
|
||||||
## https://sourceforge.net/tracker/index.php?func=detail&aid=1832924&group_id=153049&atid=786241
|
## https://sourceforge.net/tracker/index.php?func=detail&aid=1832924&group_id=153049&atid=786241
|
||||||
Patch1: paps-0.6.8-wordwrap.patch
|
Patch1: paps-0.6.8-wordwrap.patch
|
||||||
## https://sourceforge.net/tracker/index.php?func=detail&aid=1832926&group_id=153049&atid=786241
|
## https://sourceforge.net/tracker/index.php?func=detail&aid=1832926&group_id=153049&atid=786241
|
||||||
Patch2: paps-langinfo.patch
|
Patch2: paps-langinfo.patch
|
||||||
## https://sourceforge.net/tracker/index.php?func=detail&aid=1832929&group_id=153049&atid=786241
|
## https://sourceforge.net/tracker/index.php?func=detail&aid=1832929&group_id=153049&atid=786241
|
||||||
Patch3: paps-0.6.6-lcnumeric.patch
|
Patch3: paps-0.6.6-lcnumeric.patch
|
||||||
## https://sourceforge.net/tracker/index.php?func=detail&aid=1832935&group_id=153049&atid=786241
|
## https://sourceforge.net/tracker/index.php?func=detail&aid=1832935&group_id=153049&atid=786241
|
||||||
Patch4: paps-exitcode.patch
|
Patch4: paps-exitcode.patch
|
||||||
Patch50: paps-cups.patch
|
Patch50: paps-cups.patch
|
||||||
Patch51: paps-cpilpi.patch
|
Patch51: paps-cpilpi.patch
|
||||||
Patch52: paps-dsc-compliant.patch
|
Patch52: paps-dsc-compliant.patch
|
||||||
Patch53: paps-autoconf262.patch
|
Patch53: paps-autoconf262.patch
|
||||||
Patch54: paps-fix-cpi.patch
|
Patch54: paps-fix-cpi.patch
|
||||||
|
Patch55: paps-fix-loop-in-split.patch
|
||||||
|
|
||||||
Summary: Plain Text to PostScript converter
|
Summary: Plain Text to PostScript converter
|
||||||
Group: Applications/Publishing
|
Group: Applications/Publishing
|
||||||
%description
|
%description
|
||||||
paps is a PostScript converter from plain text file using Pango.
|
paps is a PostScript converter from plain text file using Pango.
|
||||||
|
|
||||||
%package libs
|
%package libs
|
||||||
Summary: Libraries for paps
|
Summary: Libraries for paps
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
%description libs
|
%description libs
|
||||||
paps is a PostScript converter from plain text file using Pango.
|
paps is a PostScript converter from plain text file using Pango.
|
||||||
|
|
||||||
This package contains the library for paps.
|
This package contains the library for paps.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for paps
|
Summary: Development files for paps
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: %{name}-libs = %{version}-%{release}
|
Requires: %{name}-libs = %{version}-%{release}
|
||||||
%description devel
|
%description devel
|
||||||
paps is a PostScript converter from plain text file using Pango.
|
paps is a PostScript converter from plain text file using Pango.
|
||||||
|
|
||||||
@ -59,6 +60,7 @@ applications using paps API.
|
|||||||
%patch52 -p1 -b .dsc
|
%patch52 -p1 -b .dsc
|
||||||
%patch53 -p1 -b .autoconf262
|
%patch53 -p1 -b .autoconf262
|
||||||
%patch54 -p1 -b .fixcpi
|
%patch54 -p1 -b .fixcpi
|
||||||
|
%patch55 -p1 -b .loop
|
||||||
libtoolize -f -c
|
libtoolize -f -c
|
||||||
autoreconf
|
autoreconf
|
||||||
|
|
||||||
@ -106,6 +108,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/libpaps.so
|
%{_libdir}/libpaps.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 27 2010 Akira TAGOH <tagoh@redhat.com> - 0.6.8-14
|
||||||
|
- Fix the infinite loop in splitting paragraphs (#618483)
|
||||||
|
|
||||||
* Fri Mar 12 2010 Akira TAGOH <tagoh@redhat.com> - 0.6.8-13
|
* Fri Mar 12 2010 Akira TAGOH <tagoh@redhat.com> - 0.6.8-13
|
||||||
- Fix the directory's group ownership. (#572733)
|
- Fix the directory's group ownership. (#572733)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user