[11714] in Athena Bugs
Bug in dsmail which may cause problems in dsmail
daemon@ATHENA.MIT.EDU (epeisach@MIT.EDU)
Tue Feb 8 07:55:17 1994
From: epeisach@MIT.EDU
Date: Tue, 8 Feb 1994 07:55:11 -0500
To: bugs@MIT.EDU, op@MIT.EDU, bug-discuss@MIT.EDU
This bug exists in dsmail.c and ndsmail.c. I was getting an unaligned
error message from free. I do not know why dsmail does not comlpain on
meneleaus (I looked at the error logs), but it may cause problems with
pickier versions of free...
Essentially - dsmail is trying to free a non-malloced pointer and I
guess that all or versions of free with silently not complain if you did
not malloc the memory.
On the alpha this shows up as an unaligned error (when it probly tries
to check the magic header on the memory if you pass an unaligned address
in).
The following patch is to dsmail.c, but a comparable one to ndsmail.c is
obvious.
(key is a pointer within keyword)
Ezra
*** 1.15 1993/04/28 15:34:41
--- dsmail.c 1994/02/08 12:47:04
***************
*** 203,209 ****
} else
ok_prev=0;
if (!iscont) {
- free(key);
free(keyword);
}
iscont = line[strlen(line)-1] != '\n';
--- 203,208 ----