Riccardo Magliocchetti
2008-May-25 19:57 UTC
[Swfdec] [RFC] check return of mallocs in swfdec/jpeg/
hi, this patch checks the returns of most malloc functions called in swfdec/jpeg. This should fix bug #15528. Don't know if you like gotos :) This incorporates the patch attached to message "[PATCH] fix leak in jpeg_decode_argb". thanks, rm -------------- next part -------------- A non-text attachment was scrubbed... Name: check-malloc-return.diff Type: text/x-diff Size: 3922 bytes Desc: not available Url : http://lists.freedesktop.org/archives/swfdec/attachments/20080525/a9f1f1e7/attachment.diff
Benjamin Otte
2008-May-25 20:14 UTC
[Swfdec] [RFC] check return of mallocs in swfdec/jpeg/
swfdec is glib code. As such it uses g_malloc and aborts when malloc fails. The fact that the jpeg code does not use g_malloc is a bug and should be fixed by putting #define malloc g_malloc in cogcompat.h, which is what I'll do. Cheers, Benjamin PS: I'm starting to dislike the idea of shipping our own jpeg library. It's slow and unmaintained. On Sun, May 25, 2008 at 9:57 PM, Riccardo Magliocchetti <riccardo.magliocchetti at gmail.com> wrote:> hi, > > this patch checks the returns of most malloc functions called in > swfdec/jpeg. This should fix bug #15528. Don't know if you like gotos :) > > This incorporates the patch attached to message "[PATCH] fix leak in > jpeg_decode_argb". > > thanks, > rm > > _______________________________________________ > Swfdec mailing list > Swfdec at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/swfdec > >