Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!topaz!husc6!harvard!panda!genrad!decvax!tektronix!hplabs!felix!scgvaxd!trwrb!desint!geoff From: geoff@desint.UUCP (Geoff Kuenning) Newsgroups: net.sources.bugs Subject: Serious bug & fix in Dave Taylor's latest 'elm' fixes Message-ID: <238@desint.UUCP> Date: Sat, 26-Jul-86 01:46:06 EDT Article-I.D.: desint.238 Posted: Sat Jul 26 01:46:06 1986 Date-Received: Sun, 27-Jul-86 21:19:16 EDT References: <145@mirror.UUCP> Reply-To: geoff@desint.UUCP (Geoff Kuenning) Organization: SAH Consulting, Manhattan Beach, CA Lines: 47 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