# Stange diff in "mailinfo: re-fix MIME multipart boundary parsing"

4 messages from 2008-08-19 to 2008-08-20. Participants: Marco Costalba, Marcus Griep, Don Zickus.
Thread: https://gitlist.dev/t/15090

## Marco Costalba, 2008-08-19 17:38

Subject: Stange diff in "mailinfo: re-fix MIME multipart boundary parsing"
Message-ID: <e5bfff550808191038u645cf4baldca5c2c4bbd02162@mail.gmail.com>
URL: https://gitlist.dev/e/e5bfff550808191038u645cf4baldca5c2c4bbd02162%40mail.gmail.com

```
Looking the diff at

http://git.kernel.org/?p=git/git.git;a=commitdiff;h=289796dd29dd656734cfd59b657deb943a71cf6a

the part of the patch applied to /t/t5100/sample.mbox file seems very
strange, is it correct ?

Marco

```

## Marcus Griep, 2008-08-19 17:51

Subject: Re: Stange diff in "mailinfo: re-fix MIME multipart boundary parsing"
Message-ID: <48AB0805.1020309@gmail.com>
URL: https://gitlist.dev/e/48AB0805.1020309%40gmail.com
In-Reply-To: <e5bfff550808191038u645cf4baldca5c2c4bbd02162@mail.gmail.com>

```
Marco Costalba wrote:
> Looking the diff at
> 
> http://git.kernel.org/?p=git/git.git;a=commitdiff;h=289796dd29dd656734cfd59b657deb943a71cf6a
> 
> the part of the patch applied to /t/t5100/sample.mbox file seems very
> strange, is it correct ?

It looks like an empty line added to the end of the file.
Unsanitary, but ok since it comes after the last MIME
multipart boundary.  Junio could probably just ax the change
to sample.mbox from the patch before applying it.

-- 
Marcus Griep
GPG Key ID: 0x5E968152
——
http://www.boohaunt.net
את.ψο´


```

## Marcus Griep, 2008-08-19 17:57

Subject: Re: Stange diff in "mailinfo: re-fix MIME multipart boundary parsing"
Message-ID: <48AB0983.2050706@gmail.com>
URL: https://gitlist.dev/e/48AB0983.2050706%40gmail.com
In-Reply-To: <48AB0805.1020309@gmail.com>

```
Marcus Griep wrote:
> It looks like an empty line added to the end of the file.
> Unsanitary, but ok since it comes after the last MIME
> multipart boundary.  Junio could probably just ax the change
> to sample.mbox from the patch before applying it.

Or I could have misunderstood the intent of the change, and it
is necessary to fully test the change, since it appears to
operate line-by-line, an empty line at the end would be necessary
to trigger the code path that stops mailinfo from looking for
another boundary.

-- 
Marcus Griep
GPG Key ID: 0x5E968152
——
http://www.boohaunt.net
את.ψο´


```

## Don Zickus, 2008-08-20 13:10

Subject: Re: Stange diff in "mailinfo: re-fix MIME multipart boundary parsing"
Message-ID: <68948ca0808200610v6d81228fiabf0317ee4ae6ec5@mail.gmail.com>
URL: https://gitlist.dev/e/68948ca0808200610v6d81228fiabf0317ee4ae6ec5%40mail.gmail.com
In-Reply-To: <48AB0983.2050706@gmail.com>

```
On Tue, Aug 19, 2008 at 1:57 PM, Marcus Griep <neoeinstein@gmail.com> wrote:
> Marcus Griep wrote:
>> It looks like an empty line added to the end of the file.
>> Unsanitary, but ok since it comes after the last MIME
>> multipart boundary.  Junio could probably just ax the change
>> to sample.mbox from the patch before applying it.

No the change was intentional.  In fact, because that extra line was
not there, a bug was hidden.  Adding the extra line exposed the bug
and hopefully will catch any more bugs in the future with regards to
the boundary code.

>
> Or I could have misunderstood the intent of the change, and it
> is necessary to fully test the change, since it appears to
> operate line-by-line, an empty line at the end would be necessary
> to trigger the code path that stops mailinfo from looking for
> another boundary.

Yes, exactly.

Cheers,
Don

```
