pacho       14/06/25 09:53:46

  Added:                dia-0.97.2-png-crash.patch
  Log:
  Fix crash and test failure (#508566 by Kolan Sh. and Drunkard Zhang; #458460 
by flameeyes and eroen)
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 
A188FBD4)

Revision  Changes    Path
1.1                  app-office/dia/files/dia-0.97.2-png-crash.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/dia/files/dia-0.97.2-png-crash.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/dia/files/dia-0.97.2-png-crash.patch?rev=1.1&content-type=text/plain

Index: dia-0.97.2-png-crash.patch
===================================================================
>From 8b8ae09fcc16cc0522679099728f779e291d959c Mon Sep 17 00:00:00 2001
From: Hans Breuer <[email protected]>
Date: Fri, 18 Apr 2014 13:28:45 +0200
Subject: Bug 728405 - back-port some bounding box calculation fixes from
 master

... so that the unit test works without complaints.

diff --git a/lib/boundingbox.c b/lib/boundingbox.c
index fd50da7..46adbfa 100644
--- a/lib/boundingbox.c
+++ b/lib/boundingbox.c
@@ -494,7 +494,7 @@ polybezier_bbox(const BezPoint *pts, int numpoints,
        account with the "pointy corners" X (and PS) add when LINEJOIN_MITER 
mode is 
        in force. */
 
-    if ((!start) && (!end)) { /* We have a non-extremity vertex. */
+    if (!end) { /* only the last segment might not produce overshoot. */
       Point vpx,vxn;
       real co,alpha;
 
@@ -515,7 +515,7 @@ polybezier_bbox(const BezPoint *pts, int numpoints,
         real overshoot;
         Point vovs,pto;
 
-       if (finite(alpha))
+       if (alpha > 0.0 && alpha < M_PI)
          overshoot = extra->middle_trans / sin(alpha/2.0);
        else /* prependicular? */
          overshoot = extra->middle_trans;
-- 
cgit v0.10.1





Reply via email to