Re: [gmime-devel] Bug in base64 decoding - corrupted last bytes of data
- From: Damian Pietras <daper daper net>
- To: Jeffrey Stedfast <fejj novell com>
- Cc: gmime-devel-list gnome org
- Subject: Re: [gmime-devel] Bug in base64 decoding - corrupted last bytes of data
- Date: Tue, 31 Aug 2010 08:37:21 +0200
On Mon, Aug 30, 2010 at 10:10:24AM -0400, Jeffrey Stedfast wrote:
> On 08/30/2010 09:17 AM, Damian Pietras wrote:
> > On Mon, Aug 30, 2010 at 08:59:46AM -0400, Jeffrey Stedfast wrote:
> >
> >> On 08/30/2010 04:58 AM, Damian Pietras wrote:
> >>
> >>> The code that does base64 decoding
> >>> (g_mime_encoding_base64_decode_step()) has a bug that leads to
> >>> corruption of last bytes of data in some situations.
> >>>
> >>>
> >> Hi Damian,
> >>
> >> Do you have an example base64 stream I can use to test fixes on? I'd
> >> prefer not to break the API.
> >>
> > I'm attaching an example. The data is strange (one char per line) but
> > valid. It must be exactly this input and the buffer size like in the code.
> > Other combinations are also possible, but this is the smallest example I
> > have.
> >
> >
>
> Thanks. I've attached another possible patch which doesn't break API.
> Lemme know if that works for you.
Your patch also works, I've tested it with various data sets and buffer
sizes.
--
Damian Pietras
http://www.linuxprogrammingblog.com
[
Date Prev][Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]