Serious bug & fix in Dave Taylor's latest 'elm' fixes
Geoff Kuenning
geoff at desint.UUCP
Sat Jul 26 15:46:06 AEST 1986
There are two separate problems with one of the enhancements offered in
Dave Taylor's latest 'elm' bugfixes, both serious. The first, which
causes segmentation violations in the Reply command on most machines,
is that three 'chloc' calls had their arguments reversed (the character
should be the *second* argument). However, if you fix that bug, you
will discover that 'elm' now corrupts the 'To:' return address by
appending the user's full name to it. This causes annoying "can't
mail to (Dave" messages.
To cure these problems, simply remove the new code from return_addr.c.
The patch below, when run through 'patch', does this. Simply type
"w|patch -d DIR" where DIR is the base directory where you unpacked 'elm'.
DON'T apply this patch unless you already applied Dave Taylor's patches;
otherwise "patch" will see it as a reversed patch and will apply it
in reverse, introducing the bug into your system!
Index: src/return_addr.c
*** src/return_addr.c.old Fri Jul 25 22:33:55 1986
--- src/return_addr.c Fri Jul 25 22:32:21 1986
***************
*** 280,292
if (first_word(buffer, "To:")) /* response to savecopy! */
get_existing_address(buffer);
- else {
- if (chloc(' ', header_table[current-1].from) > -1 ||
- (chloc('!', header_table[current-1].from) < 0 &&
- chloc('@', header_table[current-1].from) < 0))
- sprintf(name2, " (%s)", header_table[current-1].from);
- strcat(buffer, name2);
- }
}
get_existing_address(buffer)
--- 280,285 -----
if (first_word(buffer, "To:")) /* response to savecopy! */
get_existing_address(buffer);
}
get_existing_address(buffer)
--
Geoff Kuenning
{hplabs,ihnp4}!trwrb!desint!geoff
More information about the Comp.sources.bugs
mailing list