🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.soft-sys.andrew
Article #1834

Patching the bug

#1834
From: Nathaniel Borenstein
Date: Mon, 20 May 1991 14:12
17 lines
1083 bytes
The nasty bug previously mentioned appears to be due to a bad
interaction with the 822 header parsing library routine called
"Next822Word" (defined in overhead/mail/lib/scan822.c).  Apparently,
this routine was documented to return 0 on error, (although is822Error
might have been more consistent) but this was never checked for by the
date parsing routines.    The fix is a very simple one-liner in
ams/libs/ms/msparse.c:

% diff *msparse.c originals/*msparse.c
54c54
<     while (code822 && code822 != is822End) {
---
>     while (code822 != is822End) {
%

In other words, the while loop in the date parser should check for
code822 getting set to zero.
Technical Details
Message-ID: <gcBxYvK0M2YtAa9lBT@thumper.bellcore.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!THUMPER.BELLCORE.COM!nsb

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!THUMPER.BELLCORE.COM!nsb
From: nsb@THUMPER.BELLCORE.COM (Nathaniel Borenstein)
Newsgroups: comp.soft-sys.andrew
Subject: Patching the bug
Message-ID: <gcBxYvK0M2YtAa9lBT@thumper.bellcore.com>
Date: 20 May 91 14:12:11 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The Internet
Lines: 17