summaryrefslogtreecommitdiff
path: root/textproc/yamcha/patches/patch-libexec_pkemine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/yamcha/patches/patch-libexec_pkemine.cpp')
-rw-r--r--textproc/yamcha/patches/patch-libexec_pkemine.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/textproc/yamcha/patches/patch-libexec_pkemine.cpp b/textproc/yamcha/patches/patch-libexec_pkemine.cpp
new file mode 100644
index 00000000000..d0e06cf9230
--- /dev/null
+++ b/textproc/yamcha/patches/patch-libexec_pkemine.cpp
@@ -0,0 +1,16 @@
+$NetBSD: patch-libexec_pkemine.cpp,v 1.1 2012/10/03 14:40:23 marino Exp $
+
+Fix segfault bug - "is" equals std::cin when infile == "-". This delete
+command was intended for allocated std::instream object.
+
+--- libexec/pkemine.cpp.orig 2004-03-12 17:12:13.000000000 +0000
++++ libexec/pkemine.cpp
+@@ -250,7 +250,7 @@ int main (int argc, char **argv)
+ PKEMine pkemine (sigma, minsup, maxpat);
+ pkemine.run (*is, os);
+
+- if (infile == "-") delete is;
++ if (infile != "-") delete is;
+
+ return 0;
+ }