Quantcast
Channel: ImapX 2
Viewing all articles
Browse latest Browse all 1952

Created Unassigned: Bug in BodyStructureParser [2651]

$
0
0
Hi,
I think, I found a small bug in the BodyStructurePaser.cs File around Line 142.
I post the part here:

```
if (contentType == "text")
{
part.Lines = ReadLong();
}
else if (contentType == "message" && contentSubType == "rfc822")
{
SkipSpaces();

if (_reader.Peek() == '(')
{
part.Envelope = ReadEnvelope();
_reader.Read(); // Read ')' of envelope

DropExtensionData();

part.Lines = ReadLong();
}
else
```
The leading '(' should be consumed before continuing to parse the envelope.
A _reader.Read(); should be inserted like here:
```
if (contentType == "text")
{
part.Lines = ReadLong();
}
else if (contentType == "message" && contentSubType == "rfc822")
{
SkipSpaces();

if (_reader.Peek() == '(')
{
_reader.Read(); // MS MOD Read '(' of envelope
part.Envelope = ReadEnvelope();
_reader.Read(); // Read ')' of envelope

DropExtensionData();

part.Lines = ReadLong();
}
else
```

Viewing all articles
Browse latest Browse all 1952

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>