pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/gnuplot Add a patch to avoid gnuplot always s...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/97edf06e7fda
branches:  trunk
changeset: 610424:97edf06e7fda
user:      he <he%pkgsrc.org@localhost>
date:      Wed Oct 24 13:32:54 2012 +0000

description:
Add a patch to avoid gnuplot always segfaulting on a NULL pointer
de-reference on the first command.
Bump pkgrevision.

diffstat:

 graphics/gnuplot/Makefile                    |   4 ++--
 graphics/gnuplot/distinfo                    |   3 ++-
 graphics/gnuplot/patches/patch-src_command.c |  16 ++++++++++++++++
 3 files changed, 20 insertions(+), 3 deletions(-)

diffs (47 lines):

diff -r 3224abd487dd -r 97edf06e7fda graphics/gnuplot/Makefile
--- a/graphics/gnuplot/Makefile Wed Oct 24 13:15:47 2012 +0000
+++ b/graphics/gnuplot/Makefile Wed Oct 24 13:32:54 2012 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.66 2012/10/08 23:01:44 adam Exp $
+# $NetBSD: Makefile,v 1.67 2012/10/24 13:32:54 he Exp $
 
 DISTNAME=      gnuplot-4.6.0
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES+=   graphics
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=gnuplot/}
 
diff -r 3224abd487dd -r 97edf06e7fda graphics/gnuplot/distinfo
--- a/graphics/gnuplot/distinfo Wed Oct 24 13:15:47 2012 +0000
+++ b/graphics/gnuplot/distinfo Wed Oct 24 13:32:54 2012 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.19 2012/08/10 15:14:53 drochner Exp $
+$NetBSD: distinfo,v 1.20 2012/10/24 13:32:54 he Exp $
 
 SHA1 (gnuplot-4.6.0.tar.gz) = 9a43ae13546d97d4b174533ddac31a14e0edc9b2
 RMD160 (gnuplot-4.6.0.tar.gz) = 2c06500f45fb81850b45713a2cd0e38f0021b065
@@ -10,3 +10,4 @@
 SHA1 (patch-af) = e5672a05f88d0ba3c1471b379dd47cd1b274f8b1
 SHA1 (patch-ag) = 0e649f1d0aed8befdb818b991a45dbfc0d2e1e7c
 SHA1 (patch-ah) = e4024ebbc039d7b5e741aa109259de6269b03765
+SHA1 (patch-src_command.c) = 0b09c2a58b60efe93b48c7457a50a59a7275c515
diff -r 3224abd487dd -r 97edf06e7fda graphics/gnuplot/patches/patch-src_command.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/gnuplot/patches/patch-src_command.c      Wed Oct 24 13:32:54 2012 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_command.c,v 1.1 2012/10/24 13:32:54 he Exp $
+
+Avoid de-referencing a NULL pointer on the first command executed(!)
+
+--- src/command.c.orig 2012-02-27 21:58:36.000000000 +0000
++++ src/command.c
+@@ -2689,7 +2689,8 @@ rlgets(char *s, size_t n, const char *pr
+           /* deleting history entries does not work, so suppress adjacent 
+           duplicates only */
+           while (previous_history());
+-          if (strcmp(current_history()->line, line) != 0)
++          if (current_history() != NULL &&
++              strcmp(current_history()->line, line) != 0)
+               add_history(line);
+ #  else /* builtin readline */
+           add_history(line);



Home | Main Index | Thread Index | Old Index