pkgsrc/www/htdig/patches/patch-ai
sborrill 4355f5d6b8 Stop htnotify coredumping if prefix or suffix file settings aren't set.
Inspired by ftp://ftp.ccsf.org/htdig-patches/3.1.6/htnotifyNull.0
Plus some pkglint cleanups.
2007-01-24 10:25:15 +00:00

22 lines
757 B
Text

$NetBSD: patch-ai,v 1.1 2007/01/24 10:25:15 sborrill Exp $
--- htnotify/htnotify.cc.orig 2002-01-31 23:47:18.000000000 +0000
+++ htnotify/htnotify.cc 2007-01-24 09:50:09.000000000 +0000
@@ -185,7 +185,7 @@
// define default preamble text - blank string
preambleText = "";
- if (prefixfile != NULL)
+ if (prefixfile != NULL && prefixfile[0] != 0)
{
ifstream in(prefixfile);
char buffer[1024];
@@ -212,7 +212,7 @@
postambleText << " http://www.htdig.org/meta.html\n\n";
postambleText << "Cheers!\n\nht://Dig Notification Service\n";
- if (suffixfile != NULL)
+ if (suffixfile != NULL && suffixfile[0] != 0)
{
ifstream in(suffixfile);
char buffer[1024];