Article View: news.software.readers
Article #17548Re: Another trn mini-patch (Correction)
From: Olaf Titz
Date: Mon, 13 Nov 1995 00:00
Date: Mon, 13 Nov 1995 00:00
26 lines
1519 bytes
1519 bytes
As Thomas Roessler <Thomas.Roessler@sobolev.rhein.de> has pointed out
to me, my patch has the potential to bomb out if a line of input is
empty. Better use the following sanity-checked version.
Olaf
--- uudecode.c.orig Sat Oct 28 15:05:21 1995
+++ uudecode.c Tue Nov 14 00:20:18 1995
@@ -85,6 +85,11 @@
while ((state & NO_ADVANCE) || fgets(buff, sizeof buff, in) != Nullch) {
numl++;
+ lens = strlen(buff)-2;
+ if ((lens>=0) && (buff[lens] == '\r')) {
+ buff[lens] = buff[lens+1];
+ buff[lens+1] = '\0';
+ }
switch (state) {
case NEW_BEGIN:
--
___ Olaf.Titz@inka.de or @{stud,informatik}.uni-karlsruhe.de ____
__ o <URL:http://www.inka.de/~bigred/> <IRC:praetorius>
__/<_ >> Just as long as the wheels keep on turning round
_)>(_)______________ I will live for the groove 'til the sun goes down << ____
Technical Details
Message-ID:
<di096m.38u@bigred.inka.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.sources.mbox.zip!not-for-mailReferences:
<dhxxio.don@bigred.inka.de>Show Full Headers
Complete Article Headers
Message-ID: <di096m.38u@bigred.inka.de> Subject: Re: Another trn mini-patch (Correction) Date: Mon, 13 Nov 1995 00:00:00 +0000 From: Olaf Titz <olaf@bigred.inka.de> References: <dhxxio.don@bigred.inka.de> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.sources.mbox.zip!not-for-mail X-Deja-AN: 119307181 Organization: private Linux site, southern Germany Followup-to: news.software.readers,alt.sources.d Newsgroups: news.software.readers,alt.sources