Article View: news.software.readers
Article #19445Bug Fix (Re: slrn0.8.6 released)
From: da... John E. Davis
Date: Thu, 22 Feb 1996 00:00
Date: Thu, 22 Feb 1996 00:00
86 lines
3014 bytes
3014 bytes
On 20 Feb 1996 18:06:19 GMT, John Caruso <jca...@sr.csg.com>
wrote:
: On 19 Feb 1996 22:17:13 GMT, John E. Davis <da...@space.mit.edu> wrote:
: >
: > Version 0.8.6 of slrn is available from space.mit.edu in pub/davis/slrn.
:
: Big problem in this release: it dumps core under certain circumstances.
: I'd noticed a minor bug(?) in the reply option--it now prints a newline
Here is a patch for the bug. The patch affects the `reply' function in
art.c as well as the `parse_from' function. Finally I have included the
missing `;' patch for uudecode.c that affects compiling slrn on OS/2. Note:
I made slrn 0.8.6-1 available which includes these patches. You may feel
more comfortable grabbing the executable.
--- art.c.orig Wed Feb 21 20:52:04 1996
+++ art.c Wed Feb 21 23:26:06 1996
@@ -961,12 +961,27 @@
/* strip comments */
while ((ch = *from++) != 0)
{
- if ((ch == '"') || (ch == '('))
+ if (ch == '"')
{
- if (ch == '(') ch = ')';
-
ch1 = ch;
- while (((ch = *from++) != 0) && (ch != ch1)) ;
+ while (((ch = *from++) != 0) && (ch != ch1))
+ ;
+ if (ch == 0) return NULL;
+ }
+ else if (ch == '(')
+ {
+ int nump = 1;
+ ch1 = ')';
+
+ while ((ch = *from++) != 0)
+ {
+ if (ch == '(') nump++;
+ else if (ch == ch1)
+ {
+ nump--;
+ if (nump == 0) break;
+ }
+ }
if (ch == 0) return NULL;
}
else if (ch == ')') return NULL;
@@ -1012,8 +1027,8 @@
}
from = parse_from (from);
- f = slrn_strchr (from, '@');
- if ((f == NULL)
+ if ((from == NULL)
+ || (NULL == (f = slrn_strchr (from, '@')))
|| (f == from)
|| (0 == slrn_is_fqdn (f + 1)))
{
**************** END OF art.c PATCH *************************
--- uudecode.c.orig Mon Feb 19 16:52:18 1996
+++ uudecode.c Wed Feb 21 23:31:00 1996
@@ -79,7 +79,7 @@
FILE *fp, *outfp;
char buf[4096];
#ifdef __os2__
- char olddir_buf[256]
+ char olddir_buf[256];
#endif
if (newdir == NULL)
**************** END OF uudecode.c PATCH *************************
--
John E. Davis Center for Space Research/AXAF Science Center
617-258-8119 MIT 37-662c, Cambridge, MA 02139
Technical Details
Message-ID:
<slrn4intiq.p1l.davis@wiwaxia.mit.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mailReferences:
<slrn4ihtn9.jmm.davis@wiwaxia.mit.edu> <slrn4ik3fc.24a.jcaruso@raptor.sr.csg.com>Show Full Headers
Complete Article Headers
Message-ID: <slrn4intiq.p1l.davis@wiwaxia.mit.edu> Subject: Bug Fix (Re: slrn0.8.6 released) Date: Thu, 22 Feb 1996 00:00:00 +0000 From: da...@space.mit.edu (John E. Davis) References: <slrn4ihtn9.jmm.davis@wiwaxia.mit.edu> <slrn4ik3fc.24a.jcaruso@raptor.sr.csg.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mail X-Deja-AN: 140535104 Organization: Center for Space Research Reply-to: da...@space.mit.edu Newsgroups: news.software.readers,alt.lang.s-lang