[14873] in Athena Bugs
Re: sgi 8.0I: from -r garbles subject lines
daemon@ATHENA.MIT.EDU (Greg Hudson)
Tue Dec 10 20:57:10 1996
To: "Bruce R. Lewis" <brlewis@MIT.EDU>
Cc: bugs@MIT.EDU, source-reviewers@MIT.EDU
In-Reply-To: Your message of "Tue, 10 Dec 1996 15:42:54 GMT."
<199612101542.PAA27125@kindness.MIT.EDU>
Date: Tue, 10 Dec 1996 20:57:06 EST
From: Greg Hudson <ghudson@MIT.EDU>
> buf1 = malloc(winlength-len+1); /* add 1 for the NULL terminator */
> + memset(buf1, 0, winlength-len+1);
> +
> if (buf1 == NULL)
You certainly shouldn't use buf1 before the test to see if it's NULL.
The simplest thing to do is probably to change malloc() to calloc().