gEDA-dev: Bug fix for embedded pictures not working
Peter Clifton
pcjc2 at cam.ac.uk
Sat Sep 22 09:46:19 EDT 2007
On Wed, 2007-09-05 at 18:58 +0100, Peter Clifton wrote:
> Hi Ales,
>
> You might want to cherry-pick:
>
> commit 1f336cc81195dadaffd4bbec17e8a40950b7935b
> Author: Peter Clifton <pcjc2 at cam.ac.uk>
> Date: Wed Sep 5 18:47:23 2007 +0100
>
> Simplify test to call gdk_init() in o_read_picture()
>
> Avoids testing a GtkWidget pointer in TOPLEVEL variable setup by gschem or
> gattrib. Instead, just ensure we call gdk_init() at least once. If gschem
> or gattrib already did, its not a problem as repeated calls aren't harmful.
>
> I was trying to test my refactoring of the picture code, and noticed
> embedded pictures didn't work. Due to reading off the end of a memory
> buffer, the bug(s) could cause a segfault due to invalid reads.
Sorry - that is the wrong commit for that fix!
The commit to cherry-pick is:
commit 23953797984fda7cb62dceef38ac26da25c2dcd2
Author: Peter Clifton <pcjc2 at cam.ac.uk>
Date: Wed Sep 5 18:39:55 2007 +0100
Fix loading of embedded images.
Various bugs in the base64 decoding function were preventing the correct
decoding of the embedded image. In addition, it was possible for this code
to access invalid memory - possibly leading to a crash.
Additionally removes extra \n inserted between lines of the base64 input.
--
Peter Clifton
Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA
Tel: +44 (0)7729 980173 - (No signal in the lab!)
More information about the geda-dev
mailing list