From 7d4541672bfd2b9a0c35e2b7fa4a76b4de1fb129 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Feb 28 2014 19:14:54 +0000 Subject: Fix NULL access segfault (bug #1071238) --- diff --git a/gv-bug1071238.patch b/gv-bug1071238.patch new file mode 100644 index 0000000..39ff8e5 --- /dev/null +++ b/gv-bug1071238.patch @@ -0,0 +1,12 @@ +diff -up gv-3.7.4/src/zoom.c.bug1071238 gv-3.7.4/src/zoom.c +--- gv-3.7.4/src/zoom.c.bug1071238 2012-03-29 10:03:50.000000000 -0600 ++++ gv-3.7.4/src/zoom.c 2014-02-28 09:17:20.522332906 -0700 +@@ -109,7 +109,7 @@ zoom_createZoom(Widget w _GL_UNUSED, XtP + return; + } + +- if (strcmp(gv_filename, "-")) { ++ if (gv_filename != NULL && strcmp(gv_filename, "-")) { + stat(gv_filename, &sbuf); + if (mtime != sbuf.st_mtime) { + INFMESSAGE1(file has changed) ENDMESSAGE1(zoom_createZoom)return; diff --git a/gv.spec b/gv.spec index 6836fef..e0d4a9c 100644 --- a/gv.spec +++ b/gv.spec @@ -1,7 +1,7 @@ Summary: A X front-end for the Ghostscript PostScript(TM) interpreter Name: gv Version: 3.7.4 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv3+ Group: Applications/Publishing Requires: ghostscript @@ -19,6 +19,9 @@ Patch1: gv-dat.patch Patch2: gv-aarch64.patch # Fix bounding box recognition Patch3: gv-bounding-box.patch +# Fix NULL access segfault +# https://bugzilla.redhat.com/show_bug.cgi?id=1071238 +Patch4: gv-bug1071238.patch BuildRequires: /usr/bin/makeinfo BuildRequires: Xaw3d-devel %if 0%{?rhel} != 04 @@ -45,6 +48,7 @@ Gv can display PostScript and PDF documents on an X Window System. %patch1 -p1 -b .resdat %patch2 -p1 -b .aarch64 %patch3 -p2 -b .bounding-box +%patch4 -p1 -b .bug1071238 %build @@ -125,6 +129,9 @@ fi %changelog +* Fri Feb 28 2014 Orion Poplawski - 3.7.4-6 +- Fix NULL access segfault (bug #1071238) + * Thu Jan 23 2014 Orion Poplawski - 3.7.4-5 - Fix bounding box recognition with CR line terminators