aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/ispell
diff options
context:
space:
mode:
authorlawrance <lawrance@FreeBSD.org>2005-12-17 19:32:06 +0800
committerlawrance <lawrance@FreeBSD.org>2005-12-17 19:32:06 +0800
commite5c93f82a87f072eb1c3a31dfd96d747db593576 (patch)
tree9ac21d759874bf55de50f988f92a0d08d1329a24 /textproc/ispell
parentda152452114329f7e6638131723870299ceec452 (diff)
downloadfreebsd-ports-gnome-e5c93f82a87f072eb1c3a31dfd96d747db593576.tar.gz
freebsd-ports-gnome-e5c93f82a87f072eb1c3a31dfd96d747db593576.tar.zst
freebsd-ports-gnome-e5c93f82a87f072eb1c3a31dfd96d747db593576.zip
When a filename argument to 'spell' does not exist, it segfaults. Fix and
bump PORTREVISION. PR: ports/80536 Submitted by: gil <pr0ggy@cox.net> Approved by: jmz (maintainer, timeout 6 months)
Diffstat (limited to 'textproc/ispell')
-rw-r--r--textproc/ispell/Makefile2
-rw-r--r--textproc/ispell/files/patch-ispell.c20
2 files changed, 14 insertions, 8 deletions
diff --git a/textproc/ispell/Makefile b/textproc/ispell/Makefile
index 8ab39e07953a..34a9bec20bbd 100644
--- a/textproc/ispell/Makefile
+++ b/textproc/ispell/Makefile
@@ -7,7 +7,7 @@
PORTNAME?= ispell
PORTVERSION?= 3.2.06
-PORTREVISION?= 13
+PORTREVISION?= 14
CATEGORIES+= textproc
MASTER_SITES= http://fmg-www.cs.ucla.edu/geoff/tars/ \
http://distfiles.opendarwin.org/
diff --git a/textproc/ispell/files/patch-ispell.c b/textproc/ispell/files/patch-ispell.c
index 24dc68cb1712..54f5ce596c28 100644
--- a/textproc/ispell/files/patch-ispell.c
+++ b/textproc/ispell/files/patch-ispell.c
@@ -1,5 +1,5 @@
---- ispell.c.orig Wed Jul 25 17:51:46 2001
-+++ ispell.c Sat Feb 22 14:24:29 2003
+--- ispell.c.orig Thu Jul 26 07:51:46 2001
++++ ispell.c Sat Dec 17 22:21:26 2005
@@ -209,6 +209,7 @@
#include <fcntl.h>
#endif /* NO_FCNTL_H */
@@ -58,7 +58,7 @@
{
(void) fprintf (stderr,
argc == 1 ? ISPELL_C_NO_FILE : ISPELL_C_NO_FILES);
-@@ -935,6 +947,29 @@
+@@ -935,6 +947,35 @@
outfile = stdout;
checkfile ();
exit (0);
@@ -78,10 +78,16 @@
+ {
+ while (argc--)
+ {
-+ infile = setupdefmt (*argv++);
-+ outfile = stdout;
-+ checkfile ();
-+ (void) fclose (infile);
++ if ((infile = setupdefmt (*argv)) == NULL)
++ {
++ (void) fprintf (stderr, CANT_OPEN, *argv);
++ (void) sleep ((unsigned) 2);
++ } else {
++ outfile = stdout;
++ checkfile ();
++ (void) fclose (infile);
++ }
++ argv++;
+ }
+ exit (0);
+ }