diff options
author | he <he> | 2012-10-24 13:32:54 +0000 |
---|---|---|
committer | he <he> | 2012-10-24 13:32:54 +0000 |
commit | 0ebe7c3ff1c1b372d3be71def84c77cf56adb16c (patch) | |
tree | 3a69feaf3ae8952c7ccff4e6b8ab27e9bbcebc51 /graphics/gnuplot/patches | |
parent | 139321570f8dfa91911912a2639c3b0ba79adf7e (diff) | |
download | pkgsrc-0ebe7c3ff1c1b372d3be71def84c77cf56adb16c.tar.gz |
Add a patch to avoid gnuplot always segfaulting on a NULL pointer
de-reference on the first command.
Bump pkgrevision.
Diffstat (limited to 'graphics/gnuplot/patches')
-rw-r--r-- | graphics/gnuplot/patches/patch-src_command.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/graphics/gnuplot/patches/patch-src_command.c b/graphics/gnuplot/patches/patch-src_command.c new file mode 100644 index 00000000000..2d60f30c449 --- /dev/null +++ b/graphics/gnuplot/patches/patch-src_command.c @@ -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); |