From 304f72934c3e401e7cc92ea862e468d58ea96dbf Mon Sep 17 00:00:00 2001 From: Rob Swindell <rob@synchro.net> Date: Mon, 7 Mar 2022 17:53:42 -0800 Subject: [PATCH] Fix issue with smtpspy-listed names added in previous commit p (which is used after this) points into 'str', so we can't use 'str' as a temporary variable here. --- src/sbbs3/mailsrvr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sbbs3/mailsrvr.c b/src/sbbs3/mailsrvr.c index 98a5b368c2..89a8328b9f 100644 --- a/src/sbbs3/mailsrvr.c +++ b/src/sbbs3/mailsrvr.c @@ -4571,12 +4571,12 @@ static void smtp_thread(void* arg) break; } - if(spy==NULL + if(spy==NULL && (trashcan(&scfg,reverse_path,"smtpspy") || trashcan(&scfg,rcpt_addr,"smtpspy"))) { - SAFECOPY(str, client.protocol); - strlwr(str); - SAFEPRINTF2(path,"%s%sspy.txt", scfg.logs_dir, str); + SAFECOPY(tmp, client.protocol); + strlwr(tmp); + SAFEPRINTF2(path,"%s%sspy.txt", scfg.logs_dir, tmp); spy=fopen(path,"a"); } -- GitLab