From 06313c21ba60212cc67da068d708d14596c98ac8 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 16 Aug 2004 16:22:42 +0000 Subject: More sanity checks for custom headers. --- common/smtppass.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'common') diff --git a/common/smtppass.c b/common/smtppass.c index 6b43058..853e931 100644 --- a/common/smtppass.c +++ b/common/smtppass.c @@ -233,7 +233,14 @@ int main(int argc, char* argv[]) if(strlen(optarg) == 0) g_header = NULL; else + { g_header = optarg; + + /* Trim off any ending newline chars */ + t = g_header + strlen(g_header); + while(t > g_header && (*(t - 1) == '\r' || *(t - 1) == '\n')) + *(--t) = 0; + } break; /* Change our listening port */ -- cgit v1.2.3