fix crash of fig2dev on a failure of ghostscript (#728825)
This commit is contained in:
parent
ccc7053d1a
commit
7b54e9bcba
41
transfig-3.2.5d-bz728825.patch
Normal file
41
transfig-3.2.5d-bz728825.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From 422f2a135d904556a441210f16d22e1ee82baa1b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
Date: Mon, 8 Aug 2011 11:43:29 +0200
|
||||||
|
Subject: [PATCH] transfig - rhbz #728825
|
||||||
|
|
||||||
|
---
|
||||||
|
fig2dev/dev/genpdf.c | 9 ++++++---
|
||||||
|
1 files changed, 6 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/fig2dev/dev/genpdf.c b/fig2dev/dev/genpdf.c
|
||||||
|
index 37f4fe4..fe949ce 100644
|
||||||
|
--- a/fig2dev/dev/genpdf.c
|
||||||
|
+++ b/fig2dev/dev/genpdf.c
|
||||||
|
@@ -67,18 +67,21 @@ F_compound *objects;
|
||||||
|
int
|
||||||
|
genpdf_end()
|
||||||
|
{
|
||||||
|
+ int status;
|
||||||
|
+
|
||||||
|
/* wrap up the postscript output */
|
||||||
|
if (genps_end() != 0)
|
||||||
|
return -1; /* error, return now */
|
||||||
|
|
||||||
|
- if (pclose(tfp) != 0) {
|
||||||
|
+ status = pclose(tfp);
|
||||||
|
+ /* we've already closed the original output file */
|
||||||
|
+ tfp = 0;
|
||||||
|
+ if (status != 0) {
|
||||||
|
fprintf(stderr,"Error in ghostcript command\n");
|
||||||
|
fprintf(stderr,"command was: %s\n", gscom);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
(void) signal(SIGPIPE, SIG_DFL);
|
||||||
|
- /* we've already closed the original output file */
|
||||||
|
- tfp = 0;
|
||||||
|
|
||||||
|
/* all ok so far */
|
||||||
|
|
||||||
|
--
|
||||||
|
1.7.4.4
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Utility for converting FIG files (made by xfig) to other formats
|
Summary: Utility for converting FIG files (made by xfig) to other formats
|
||||||
Name: transfig
|
Name: transfig
|
||||||
Version: 3.2.5d
|
Version: 3.2.5d
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://www.xfig.org/
|
URL: http://www.xfig.org/
|
||||||
@ -11,6 +11,7 @@ Source0: http://downloads.sourceforge.net/mcj/%{name}.%{version}.tar.gz
|
|||||||
Patch0: transfig-3.2.5-optflags.patch
|
Patch0: transfig-3.2.5-optflags.patch
|
||||||
Patch1: transfig-3.2.5-modularX.patch
|
Patch1: transfig-3.2.5-modularX.patch
|
||||||
Patch2: transfig-3.2.5-bitmap.patch
|
Patch2: transfig-3.2.5-bitmap.patch
|
||||||
|
Patch3: transfig-3.2.5d-bz728825.patch
|
||||||
|
|
||||||
Requires: ghostscript
|
Requires: ghostscript
|
||||||
Requires: bc
|
Requires: bc
|
||||||
@ -38,6 +39,7 @@ figures into certain graphics languages.
|
|||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
|
||||||
# fix source permissions
|
# fix source permissions
|
||||||
find -type f -exec chmod -x {} \;
|
find -type f -exec chmod -x {} \;
|
||||||
@ -75,6 +77,9 @@ rm -rf %{buildroot}
|
|||||||
%{_datadir}/fig2dev
|
%{_datadir}/fig2dev
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 09 2011 Kamil Dudka <kdudka@redhat.com> - 1:3.2.5d-3
|
||||||
|
- fix crash of fig2dev on a failure of ghostscript (#728825)
|
||||||
|
|
||||||
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.2.5d-2
|
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.2.5d-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user