🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #56572

Re: [yenc] yydecode -- reimplementation of decoder

#56572
From: Liyang Hu
Date: Sun, 17 Feb 2002 02:28
54 lines
2669 bytes
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!

>        Incorrect header/trailer entities (i.e. wrong CRC, line
> length, file size)

Add to that overlong lines -- test for buffer overflows. (I'm pretty
confident yydecode should be able to cope.)

> Multipart encodes:
>        Missing part

yydecode would leave the missing part as zeroes.

>        Duplicated part

The later part would overwrite the earlier.

>        Same .ntx, multiple parts for same file
>        Same .ntx, multiple parts for different files
>        Overlapping parts

yydecode would believe the later parts.

> Can anyone think of any cases I've missed?

I'm sure you'll think of more specific cases as you go through the
process. ^_^

mata ne,
/Liyang
-- 
.--| Liyang HU |--| http://nerv.cx/ |--| Caius@Cam |--| ICQ: 39391385 |--.
| Real programmers don't write in BASIC.                                 |
| Actually, no programmers write in BASIC after reaching puberty.        |
Technical Details
Message-ID: <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!130.133.1.3!fu-berlin.de!server1.netnews.ja.net!pegasus.csx.cam.ac.uk!not-for-mail
References: <a4i6q4$kr8$1@pegasus.csx.cam.ac.uk> <41299.g22205@archiver.winews.net> <0vct6ugbfkb43j1p6168m37qoml0ahtej9@4ax.com>

Show Full Headers
Complete Article Headers
Message-ID: <a4n4gp$5c6$1@pegasus.csx.cam.ac.uk>
Subject: Re: [yenc] yydecode -- reimplementation of decoder
Date: Sun, 17 Feb 2002 02:28:41 +0000
From: Liyang Hu <newsgroups@nerv.cx>
References: <a4i6q4$kr8$1@pegasus.csx.cam.ac.uk> <41299.g22205@archiver.winews.net> <0vct6ugbfkb43j1p6168m37qoml0ahtej9@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!130.133.1.3!fu-berlin.de!server1.netnews.ja.net!pegasus.csx.cam.ac.uk!not-for-mail
Newsgroups: news.software.nntp
Organization: University of Cambridge, England
Lines: 53
Sender: Liyang Hu <lh259@portal.acad.cai.cam.ac.uk>
NNTP-Posting-Host: portal.acad.cai.cam.ac.uk
User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (Linux/2.4.17-xfs+lvm10+intl (i686))