From 882b8d14815c6bbac6d4f6e5d9e817dd637a3953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Groenvall?= Date: Fri, 12 Mar 1993 16:12:27 +0000 Subject: [PATCH] Don't write lines that get to long when constructing Return-Path : address line. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/popper/pop_send.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/appl/popper/pop_send.c b/appl/popper/pop_send.c index 0e0f76dd8..40df48422 100644 --- a/appl/popper/pop_send.c +++ b/appl/popper/pop_send.c @@ -82,12 +82,14 @@ POP * p; if ((return_path_end = index(return_path_adr, ' ')) != NULL) *return_path_end = '\0'; if (strlen(return_path_adr) != 0 && *return_path_adr != '\n') { - static char tmpbuf[MAXMSGLINELEN]; - strcpy(tmpbuf, "Return-Path:"); + static char tmpbuf[MAXMSGLINELEN + 20]; + strcpy(tmpbuf, "Return-Path: "); strcat(tmpbuf, return_path_adr); strcat(tmpbuf, "\n"); - pop_sendline (p,tmpbuf); - return_path_sent++; + if (strlen(tmpbuf) < MAXMSGLINELEN) { + pop_sendline (p,tmpbuf); + return_path_sent++; + } } } }