pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/MesaLib Fix segfaults and crashing with appli...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5e0bc3e5473e
branches:  trunk
changeset: 645547:5e0bc3e5473e
user:      nat <nat%pkgsrc.org@localhost>
date:      Thu Jan 29 22:35:43 2015 +0000

description:
Fix segfaults and crashing with applications that use libGLU.

This commit was approved by wiz@

diffstat:

 graphics/MesaLib/distinfo                                  |   3 +-
 graphics/MesaLib/patches/patch-src_glu_sgi_libtess_sweep.c |  49 ++++++++++++++
 2 files changed, 51 insertions(+), 1 deletions(-)

diffs (70 lines):

diff -r 6a3fa0dc6d57 -r 5e0bc3e5473e graphics/MesaLib/distinfo
--- a/graphics/MesaLib/distinfo Thu Jan 29 22:22:26 2015 +0000
+++ b/graphics/MesaLib/distinfo Thu Jan 29 22:35:43 2015 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.88 2014/08/06 10:25:14 wiz Exp $
+$NetBSD: distinfo,v 1.89 2015/01/29 22:35:43 nat Exp $
 
 SHA1 (Mesa-7.11.2/MesaGLUT-7.11.2.tar.bz2) = 2e6e730204800a0748b301a5f58b86332699788b
 RMD160 (Mesa-7.11.2/MesaGLUT-7.11.2.tar.bz2) = bb2b140375aa13df79fcdb60a7ad0a63622dc531
@@ -15,6 +15,7 @@
 SHA1 (patch-src_glsl_ir__constant__expression.cpp) = 281e281f51afed244b1a29b92942d572fc095124
 SHA1 (patch-src_glsl_ralloc.c) = 40885fac898058f8e83852a79ca50a74b61121ab
 SHA1 (patch-src_glu_sgi_glu.exports) = 66609d2ea59b02fc46b41311b0042fe4a2da517f
+SHA1 (patch-src_glu_sgi_libtess_sweep.c) = 6ee6d67b2178d23e1b7848d64eede6349f46ee96
 SHA1 (patch-src_glx_XF86dri.c) = b69b7cf5e0d617eca129f0d7f0b06c7603d00db0
 SHA1 (patch-src_mesa_drivers_dri_common_dri__util.h) = 53e63dcc6243b1872f4e4816b46e92910cf97edc
 SHA1 (patch-src_mesa_drivers_dri_common_mmio.h) = b6da48111fb2792b1c71eb7549d0f03adceec9f1
diff -r 6a3fa0dc6d57 -r 5e0bc3e5473e graphics/MesaLib/patches/patch-src_glu_sgi_libtess_sweep.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/MesaLib/patches/patch-src_glu_sgi_libtess_sweep.c        Thu Jan 29 22:35:43 2015 +0000
@@ -0,0 +1,49 @@
+$NetBSD: patch-src_glu_sgi_libtess_sweep.c,v 1.1 2015/01/29 22:35:43 nat Exp $
+
+Fixes segfaults and crashes in applications using libGLU.
+--- src/glu/sgi/libtess/sweep.c.orig   2010-10-05 16:56:51.000000000 +0000
++++ src/glu/sgi/libtess/sweep.c
+@@ -546,7 +546,9 @@ static int CheckForRightSplice( GLUtesse
+     if( EdgeSign( eUp->Dst, eLo->Org, eUp->Org ) < 0 ) return FALSE;
+ 
+     /* eLo->Org appears to be above eUp, so splice eLo->Org into eUp */
+-    RegionAbove(regUp)->dirty = regUp->dirty = TRUE;
++    if (RegionAbove(regUp))
++        RegionAbove(regUp)->dirty = TRUE;
++    regUp->dirty = TRUE;
+     if (__gl_meshSplitEdge( eUp->Sym ) == NULL) longjmp(tess->env,1);
+     if ( !__gl_meshSplice( eLo->Oprev, eUp ) ) longjmp(tess->env,1);
+   }
+@@ -584,7 +586,9 @@ static int CheckForLeftSplice( GLUtessel
+     if( EdgeSign( eUp->Dst, eLo->Dst, eUp->Org ) < 0 ) return FALSE;
+ 
+     /* eLo->Dst is above eUp, so splice eLo->Dst into eUp */
+-    RegionAbove(regUp)->dirty = regUp->dirty = TRUE;
++    if (RegionAbove(regUp))
++        RegionAbove(regUp)->dirty = TRUE;
++    regUp->dirty = TRUE;
+     e = __gl_meshSplitEdge( eUp );
+     if (e == NULL) longjmp(tess->env,1);
+     if ( !__gl_meshSplice( eLo->Sym, e ) ) longjmp(tess->env,1);
+@@ -718,7 +722,9 @@ static int CheckForIntersect( GLUtessela
+      * (and wait for ConnectRightVertex to splice it appropriately).
+      */
+     if( EdgeSign( dstUp, tess->event, &isect ) >= 0 ) {
+-      RegionAbove(regUp)->dirty = regUp->dirty = TRUE;
++      if (RegionAbove(regUp))
++          RegionAbove(regUp)->dirty = TRUE;
++      regUp->dirty = TRUE;
+       if (__gl_meshSplitEdge( eUp->Sym ) == NULL) longjmp(tess->env,1);
+       eUp->Org->s = tess->event->s;
+       eUp->Org->t = tess->event->t;
+@@ -753,7 +759,9 @@ static int CheckForIntersect( GLUtessela
+      longjmp(tess->env,1);
+   }
+   GetIntersectData( tess, eUp->Org, orgUp, dstUp, orgLo, dstLo );
+-  RegionAbove(regUp)->dirty = regUp->dirty = regLo->dirty = TRUE;
++  if (RegionAbove(regUp))
++      RegionAbove(regUp)->dirty = TRUE;
++  regUp->dirty = regLo->dirty = TRUE;
+   return FALSE;
+ }
+ 



Home | Main Index | Thread Index | Old Index