Re: [gmime-devel] Patch to fix segfault when decoding an invalid 8bit header



Thanks! I've applied a similar fix to the gmime-2-4 and master branches
in git. I'll make a new release of gmime-2.4 shortly.

Jeff

Damian Pietras wrote:
> When using g_mime_utils_decode_8bit to read an 8bit header gmime 2.4.11
> will segfault if there are unknown non-ascii characters because of a bug
> in this loop:
>
> 		while (inptr < inend) {
>                         if (is_ascii (*inptr))
>                                 *outbuf++ = *inptr++;
>                         else
>                                 *outbuf++ = '?';
>                 }
>
> So when we encounter a non-ascii char it will become an infinite (until
> segfault) loop that advances the outbuf pointer but not inptr. A patch
> for this is attached.
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> gmime-devel-list mailing list
> gmime-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gmime-devel-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]