[26384] in Athena Bugs
linux 9.3.18: edsc
daemon@ATHENA.MIT.EDU (Ken Raeburn)
Wed Mar 2 17:41:08 2005
Message-Id: <200503022240.j22MePRR023213@all-in-one.mit.edu>
To: bugs@mit.edu
Date: Wed, 02 Mar 2005 17:40:25 -0500
From: Ken Raeburn <raeburn@mit.edu>
X-Spam-Score: -4.9
X-Spam-Flag: NO
cc: raeburn@mit.edu
Errors-To: bugs-bounces@mit.edu
System name: all-in-one.mit.edu
Type and version: i686 9.3.18
Display type: Matrox Graphics, Inc. MGA G400 AGP (rev 85)
Shell: /bin/athena/tcsh
Window manager: vtwm.gamma
What were you trying to do?
read a mailing list (gsp-ec) archive stored in discuss, using
emacs (gnus)
What's wrong:
It errored out parsing the data read back from edsc, because
an author or signature field had a '"' in it.
What should have happened:
it should've just worked.
Please describe any relevant documentation references:
emacs(1)
The patch below seems to make it work for me, but isn't perfect; it
looks like it'll turn this sometimes-error into an always-memory-leak,
to go along with the apparent leak of the storage when quoting the
subject.
There is probably more quoting that should be done, pretty much any
time data from the server is dumped out with a "%s" format. I'd be
surprised if a newline stored in the data fields wouldn't confuse some
of the emacs code as well; changing it to "\n" might be wise.
Ken
--- /mit/source/athena/bin/discuss/edsc/do_trn.c Wed Feb 3 00:00:23 1999
+++ do_trn.c Wed Mar 2 15:04:09 2005
@@ -73,6 +73,8 @@
}
t_info.subject = do_quote(t_info.subject);
+ t_info.author = do_quote(t_info.author);
+ t_info.signature = do_quote(t_info.signature ? t_info.signature : "");
printf("(%d %d %d %d %d %d %d %d \"%s\" %d %d \"%s\" \"%s\" %d \"%s\")\n",
t_info.current,
t_info.prev,
@@ -88,7 +90,7 @@
t_info.subject,
t_info.author,
t_info.flags,
- t_info.signature ? t_info.signature : "");
+ t_info.signature);
dsc_destroy_name_blk(&nb);
dsc_destroy_trn_info3(&t_info);