Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jan 2008 09:03:56 +0100
From:      "Pietro Cerutti" <gahr@gahr.ch>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Cc:        randolf.schultz@gmail.com
Subject:   ports/119559: [patch] games/ayam fix crash when parsing shaders
Message-ID:  <1200038636.13090@gahrtop.localhost>
Resent-Message-ID: <200801110810.m0B8A3lk051030@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         119559
>Category:       ports
>Synopsis:       [patch] games/ayam fix crash when parsing shaders
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 11 08:10:03 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Pietro Cerutti
>Release:        FreeBSD 8.0-CURRENT i386
>Organization:
>Environment:


System: FreeBSD 8.0-CURRENT #20: Tue Jan  8 15:03:14 CET 2008
    root@gahrtop.localhost:/usr/obj/usr/src/sys/MSI1034



>Description:


Author notes that since aqsis 1.2, parsing shaders causes ayam to crash.


>How-To-Repeat:





>Fix:


--- _ayam.diff begins here ---
--- files/patch-aycore_shader.c.orig	2008-01-10 19:21:46.000000000 +0100
+++ files/patch-aycore_shader.c	2008-01-10 19:24:01.000000000 +0100
@@ -9,6 +9,30 @@
  #else
    /* change all ; to : in shader search path */
    Tcl_DStringInit(&ds);
+@@ -415,7 +415,11 @@
+ 	}
+ 
+       /* XXXX temporarily discard array arguments   */
++#ifdef AYAQSIS10
+       if(symbol->svd_arraylen < 1)
++#else
++      if(symbol->svd_arraylen < 2)
++#endif
+ 	{
+ 
+       Tcl_DStringAppend(&ds, "{ ", -1);
+@@ -450,7 +454,10 @@
+ 	  break;
+ 	}
+ 
+-      arraylen = symbol->svd_arraylen;
++      arraylen = symbol->svd_arraylen-1;
++#ifdef AYAQSIS10
++      arraylen++;
++#endif
+       sprintf(buffer, "%d ", arraylen);
+       Tcl_DStringAppend(&ds, buffer, -1);
+
 @@ -1094,7 +1094,8 @@
   ay_mat_object *material = NULL;
   ay_shader *newshader = NULL, **shader = NULL;
--- Makefile.orig	2008-01-10 19:27:42.000000000 +0100
+++ Makefile	2008-01-10 20:51:45.000000000 +0100
@@ -7,6 +7,7 @@
 
 PORTNAME=	ayam
 PORTVERSION=	1.13
+PORTREVISION=	1
 CATEGORIES=	graphics
 MASTER_SITES=	SF
 DISTNAME=	${PORTNAME}${PORTVERSION}.src
--- _ayam.diff ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1200038636.13090>