summaryrefslogtreecommitdiff
path: root/common/smtppass.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-08-16 16:22:42 +0000
committerStef Walter <stef@memberwebs.com>2004-08-16 16:22:42 +0000
commit06313c21ba60212cc67da068d708d14596c98ac8 (patch)
tree92cd28b6c819aa50c3fcfd51f66b57c676af2a22 /common/smtppass.c
parentf37588733fd4cf172ad96fcdda150d3cf4623b42 (diff)
More sanity checks for custom headers.
Diffstat (limited to 'common/smtppass.c')
-rw-r--r--common/smtppass.c7
1 files changed, 7 insertions, 0 deletions
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 */