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

gEDA-cvs: pcb.git: branch: master updated (edcffc2fac1ea9ce6c5ebb2ee21612dc1c9b361e)



The branch, master has been updated
       via  edcffc2fac1ea9ce6c5ebb2ee21612dc1c9b361e (commit)
      from  e6433aef0f18191a1ce512c5e8ccb79d7ece886f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 src/hid/png/png.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)


=================
 Commit Messages
=================

commit edcffc2fac1ea9ce6c5ebb2ee21612dc1c9b361e
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Commit: Dan McMahill <dan@xxxxxxxxxxxx>

    Do not try to call gdImageCreate() on a 0x0 sized image.
    
    This hopefully addresses some of the segfaults seen recently
    with the latest version of gd.  If a brush size scales to give
    a size of 0 then bump it up to a single pixel.

:100644 100644 983dac5... c407840... M	src/hid/png/png.c

=========
 Changes
=========

commit edcffc2fac1ea9ce6c5ebb2ee21612dc1c9b361e
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Commit: Dan McMahill <dan@xxxxxxxxxxxx>

    Do not try to call gdImageCreate() on a 0x0 sized image.
    
    This hopefully addresses some of the segfaults seen recently
    with the latest version of gd.  If a brush size scales to give
    a size of 0 then bump it up to a single pixel.

diff --git a/src/hid/png/png.c b/src/hid/png/png.c
index 983dac5..c407840 100644
--- a/src/hid/png/png.c
+++ b/src/hid/png/png.c
@@ -1155,6 +1155,13 @@ use_gc (hidGC gc)
 	r = SCALE (gc->width + 2*bloat);
       else
 	r = 1;
+
+      /* do not allow a brush size that is zero width.  In this case limit to a single pixel. */
+      if (r == 0)
+	{
+	  r = 1;
+        }
+
       sprintf (name, "#%.2x%.2x%.2x_%c_%d", gc->color->r, gc->color->g,
 	       gc->color->b, type, r);
 




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs