diff --git a/ChangeLog b/ChangeLog index 54a7a93f..914a9b00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4671,6 +4671,7 @@ v0.33.20 10-Feb-2002 ticfiles setup to forward file to and there was no noderecord. When a ticfile was received while our aka is in the path, the bad tic counter wasn't increased. + Made error message in AddMsgHdr function more clear. mball: Will not crash anymore when it needs more then 10 minutes to diff --git a/mbfido/addpkt.c b/mbfido/addpkt.c index 019e2b08..b9e5f73f 100644 --- a/mbfido/addpkt.c +++ b/mbfido/addpkt.c @@ -199,7 +199,18 @@ int AddMsgHdr(FILE *fp, faddr *f, faddr *t, int flags, int cost, time_t date, ch if ((tname == NULL) || (strlen(tname) > 36) || (fname == NULL) || (strlen(fname) > 36) || (subj == NULL) || (strlen(subj) > 72)) { - WriteError("AddMsgHdr() error in To name, From name or Subject field"); + if (tname == NULL) + WriteError("AddMsgHdr() error, To name is NULL"); + else if (strlen(tname) > 36) + WriteError("AddMsgHdr() error, To name length %d", strlen(tname)); + if (fname == NULL) + WriteError("AddMsgHdr() error, From name is NULL"); + else if (strlen(fname) > 36) + WriteError("AddMsgHdr() error, From name length %d", strlen(fname)); + if (subj == NULL) + WriteError("AddMsgHdr() error, Subject is NULL"); + else if (strlen(subj) > 72) + WriteError("AddMsgHdr() error, Subject length %d", strlen(subj)); return 1; }