diff options
Diffstat (limited to 'graphics/glu')
-rw-r--r-- | graphics/glu/Makefile | 3 | ||||
-rw-r--r-- | graphics/glu/distinfo | 3 | ||||
-rw-r--r-- | graphics/glu/patches/patch-src_libtess_sweep.c | 50 |
3 files changed, 54 insertions, 2 deletions
diff --git a/graphics/glu/Makefile b/graphics/glu/Makefile index ceb7af19231..7b85786110b 100644 --- a/graphics/glu/Makefile +++ b/graphics/glu/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.60 2015/04/02 23:03:00 tnn Exp $ +# $NetBSD: Makefile,v 1.61 2015/04/18 17:44:12 tnn Exp $ DISTNAME= glu-9.0.0 +PKGREVISION= 1 CATEGORIES= graphics MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/glu/ EXTRACT_SUFX= .tar.bz2 diff --git a/graphics/glu/distinfo b/graphics/glu/distinfo index d3e46eaf54f..5deb2fc67b5 100644 --- a/graphics/glu/distinfo +++ b/graphics/glu/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.16 2015/04/03 00:27:47 tnn Exp $ +$NetBSD: distinfo,v 1.17 2015/04/18 17:44:12 tnn Exp $ SHA1 (glu-9.0.0.tar.bz2) = c2814bbaf1e60e28a75ec80f4646047c0da742bd RMD160 (glu-9.0.0.tar.bz2) = 567991e97a0702699d9db33f45c2dc0cef1006f1 Size (glu-9.0.0.tar.bz2) = 493206 bytes +SHA1 (patch-src_libtess_sweep.c) = b7f9ca4e1a83e0081b3cfa418f378e33392f7f65 diff --git a/graphics/glu/patches/patch-src_libtess_sweep.c b/graphics/glu/patches/patch-src_libtess_sweep.c new file mode 100644 index 00000000000..3cba8ef7ec4 --- /dev/null +++ b/graphics/glu/patches/patch-src_libtess_sweep.c @@ -0,0 +1,50 @@ +$NetBSD: patch-src_libtess_sweep.c,v 1.1 2015/04/18 17:44:12 tnn Exp $ + +Fixes segfaults and crashes in applications using libGLU. + +--- src/libtess/sweep.c.orig 2012-09-15 00:48:54.000000000 +0000 ++++ src/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; + } + |