W3C home > Mailing lists > Public > www-lib@w3.org > April to June 1996

More troubles with MIME parser

From: Kevin Kenny <kennykb@cobweb.crd.ge.com>
Date: Fri, 26 Apr 96 21:41:28 -0500
Message-Id: <9604262141.AA27564@cobweb.crd.ge.com>
To: www-lib@w3.org
I have tried some more work with the MIME parser in the W3C Reference Library,
and I've run into trouble.

I have a multipart input file that has CR-LF pairs at the ends of the lines.
The MIME parser gets into HTBoundary_put_block, finds the first occurrence
of the boundary, and sets state to EOL_DOT.  It then falls into code that
looks like:

	    if (*b == '-') {
		me->dash++;
	    } else if (*b != LF) {
		me->dash = 0;
		me->state = EOL_BEGIN;
	    }

*b is the CR of the CR-LF pair that ends the line.  It is neither a hyphen
nor a linefeed, so the state reverts to EOL_BEGIN.

Eventually, we reach the end of the block of data, (l = 0), attempt to
PUTBLOCK to a target stream that has never been initialized, and dump core.

It also appears that the code can't work if the --BOUNDARY string isn't
all in the same block of the input.

Am I missing something, or is the parser seriously buggy at this point?

--
73 de ke9tv/2, Kevin KENNY   GE Corporate Research & Development
kennykb@crd.ge.com           P. O. Box 8, Room KWC273
                             Schenectady, New York 12301-0008 USA
Received on Friday, 26 April 1996 17:45:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:26 GMT