[10551] in Athena Bugs
A bug in the xzwrite source code...
daemon@ATHENA.MIT.EDU (wchuang@Athena.MIT.EDU)
Thu Jun 10 12:40:03 1993
From: wchuang@Athena.MIT.EDU
Date: Thu, 10 Jun 93 12:39:59 -0400
To: bugs@Athena.MIT.EDU
A user reported that there was a bug in the source code for xzwrite
(which he had gotten from the Zephyr locker, /mit/zephyr/src/clients/xzwrite).
Anyway, he sent me the following clip of code:
> From: ringrose@ai.mit.edu (Robert Ringrose)
> Received: by fibula (4.1/AI-4.10) id AA04271; Thu, 10 Jun 93 12:27:28 EDT
> Date: Thu, 10 Jun 93 12:27:28 EDT
> Message-Id: <9306101627.AA04271@fibula>
> To: wchuang@Athena.MIT.EDU
> In-Reply-To: wchuang@athena.mit.edu's message of Thu, 10 Jun 93 12:00:22 -0400 <
> 9306101600.AA11686@momoney>
> Subject: Your OLC question about "other"
>
> Makes sense.
>
> I'm going to close the question, but you might want to look at the source code
> for xzwrite - by your reasoning, the code _in_the_zephyr_locker_ is just plain
> wrong (fancy that, it didn't work when I copied it out).
>
> athena% attach zephyr
> attach: /afs/athena.mit.edu/astaff/project/zephyr linked to /mit/zephyr for file
> system zephyr
> athena% cd /mit/zephyr/src
> athena% ls
> ChangeLog config libdyn patchlevel.h tools
> Imakefile et libs prototype.c zhm
> Makefile imake makedepend server zwgc
> RCS include man server.old
> clients lib ozwgc ss
> athena% cd clients/xzwrite
> athena% more edit_window.c
> <snip>
> void edit_yank_store()
> {
> char *buf;
>
> XtVaGetValues(editor,
> XtNstring, (XtArgVal) &buf,
> NULL);
>
> if (buf != NULL && *buf != '\0')
> yank_store(¤t_dest, buf);
>
> XawAsciiSourceFreeString(editor);
> }
>
> There are a few other places, that was just easiest to find.
>
> - Robert Ringrose
> ringrose@ai.mit.edu
***********
The last line of code should be:
XawAsciiSourceFreeString(buf);
Apparently there are a bunch more errors like this.
***********
I took a look in the source tree, and that version looks just as old as
the one in the Zephyr locker. Besides:
momoney% pwd
/afs/rel-eng.athena.mit.edu/project/release/current/source/athena/athena.lib/zephyr/clients/xzwrite
momoney% grep "XawAsciiSourceFreeString(editor)" *.c
edit_window.c: XawAsciiSourceFreeString(editor);
edit_window.c: XawAsciiSourceFreeString(editor);
-William