From 08978d76e22e5d36dcc9350e0eb6306f3a0bb940 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Sun, 2 Oct 2005 23:00:45 +0000 Subject: [PATCH] Verify that if the index.to field is non-zero or there's a to_ext header field, that they match. This will catch a QWK networking bug in previous Synchronet versions where the index.to was non-zero (the number of the QWKnet node account), but there was no hdr.to_ext field, thus the index could not be recreated from the information in the header (e.g. by fixsmb). This was actually an intentional design decision at the time, but in hindsight, it's a bug (the index file is not supposed to contain any unique information). --- src/sbbs3/chksmb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sbbs3/chksmb.c b/src/sbbs3/chksmb.c index 6980db82bb..b1317e363f 100644 --- a/src/sbbs3/chksmb.c +++ b/src/sbbs3/chksmb.c @@ -437,7 +437,8 @@ int main(int argc, char **argv) subjcrc++; } if(smb.status.attr&SMB_EMAIL - && msg.from_ext && msg.idx.from!=atoi(msg.from_ext)) { + && (msg.from_ext!=NULL || msg.idx.from) + && (msg.from_ext==NULL || msg.idx.from!=atoi(msg.from_ext))) { fprintf(stderr,"%sFrom extension mismatch\n",beep); msgerr=TRUE; if(extinfo) @@ -457,7 +458,8 @@ int main(int argc, char **argv) fromcrc++; } if(smb.status.attr&SMB_EMAIL - && msg.to_ext && msg.idx.to!=atoi(msg.to_ext)) { + && (msg.to_ext!=NULL || msg.idx.to) + && (msg.to_ext==NULL || msg.idx.to!=atoi(msg.to_ext))) { fprintf(stderr,"%sTo extension mismatch\n",beep); msgerr=TRUE; if(extinfo) -- GitLab