From e0009e9ae1cdbf5c23b20682842fff99da784674 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Tue, 16 Jan 2007 21:57:07 +0000 Subject: [PATCH] Fixed crash in allocation of mail_to SVN revision: 1783 --- src/elogd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/elogd.c b/src/elogd.c index 7badbfce..f8ca4a99 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -20040,14 +20040,14 @@ void submit_elog(LOGBOOK * lbs) if ((p = strstr(mail_list[i], "mailto:")) != NULL) strcpy(p, p + 7); - if ((int) strlen(mail_to) + (int) strlen(mail_list[i]) >= mail_to_size) { + if ((int) strlen(mail_to) + (int) strlen(mail_list[i]) + 10 >= mail_to_size) { mail_to_size += 256; mail_to = xrealloc(mail_to, mail_to_size); } strcat(mail_to, mail_list[i]); strcat(mail_to, ","); - if ((int) strlen(rcpt_to) + (int) strlen(mail_list[i]) >= rcpt_to_size) { + if ((int) strlen(rcpt_to) + (int) strlen(mail_list[i]) + 10 >= rcpt_to_size) { rcpt_to_size += 256; rcpt_to = xrealloc(rcpt_to, rcpt_to_size); }