Article View: news.software.nntp
Article #56586Re: [yenc] yydecode -- reimplementation of decoder
From: Neeber
Date: Sun, 17 Feb 2002 17:35
Date: Sun, 17 Feb 2002 17:35
51 lines
2696 bytes
2696 bytes
On 17 Feb 2002 02:28:41 GMT, Liyang Hu <newsgroups@nerv.cx> wrote: >Neeber <a110y2@hotmail.com> wrote: >> Speaking of which, I've toyed recently with the idea of creating a >> test suite of broken and corrupt yEnc-encoded files, so developers >> have a way of testing any decoder client they produce. > >Great idea. ^_^ > >> All encodes. >> Missing header >> Missing trailer >> Missing header/trailer entities > >yydecode should just give up in these cases. > >> Corrupt header/trailer entities (i.e. illegal characters) > >How would you propose the decoder cope with all of these then? >Should it just give up, or try to Do the Right Thing? (Then again, >in these cases, what is the right thing to do?) Make sure you >include a description of expected behaviour! From a user's perspective, I'd want the application to, above all, not produce invalid output files. A user would be satisfied to know that the file (or part) was corrupted somehow, and not expect the app to magically fix the corruption. It's reasonable to expect that no sensibly-programmed encoder would ever produce these kinds of errors, and that such errors would only occur from transport failures (some gateway mangled it, or some other piece of software corrupted it). From a programmer's perspective, all they'd really need to take care of is to not crash :) > >> Incorrect header/trailer entities (i.e. wrong CRC, line >> length, file size) > >Add to that overlong lines -- test for buffer overflows. Yup. > >I'm sure you'll think of more specific cases as you go through the >process. ^_^ > K.T. Homme already gave me some. This is good stuff. Cheers.
Technical Details
Message-ID:
<drpv6u0kmvn0fo53r6sj281m2fqct8te97@4ax.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!128.230.129.106!news.maxwell.syr.edu!newsfeed.novia.net.MISMATCH!novia!novia!sequencer.newscene.com!not-for-mailReferences:
<a4i6q4$kr8$1@pegasus.csx.cam.ac.uk> <41299.g22205@archiver.winews.net> <0vct6ugbfkb43j1p6168m37qoml0ahtej9@4ax.com> <a4n4gp$5c6$1@pegasus.csx.cam.ac.uk>Show Full Headers
Complete Article Headers
Message-ID: <drpv6u0kmvn0fo53r6sj281m2fqct8te97@4ax.com> Subject: Re: [yenc] yydecode -- reimplementation of decoder Date: Sun, 17 Feb 2002 17:35:05 +0000 From: Neeber <a110y2@hotmail.com> References: <a4i6q4$kr8$1@pegasus.csx.cam.ac.uk> <41299.g22205@archiver.winews.net> <0vct6ugbfkb43j1p6168m37qoml0ahtej9@4ax.com> <a4n4gp$5c6$1@pegasus.csx.cam.ac.uk> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!128.230.129.106!news.maxwell.syr.edu!newsfeed.novia.net.MISMATCH!novia!novia!sequencer.newscene.com!not-for-mail Newsgroups: news.software.nntp Lines: 50 X-Newsreader: Forte Agent 1.8/32.553 trialware MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit