Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Apr 2014 17:43:50 +0000 (UTC)
From:      Mikhail Teterin <mi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r352693 - in head/graphics/gdtclft: . files
Message-ID:  <201404301743.s3UHhoiM054935@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mi
Date: Wed Apr 30 17:43:50 2014
New Revision: 352693
URL: http://svnweb.freebsd.org/changeset/ports/352693
QAT: https://qat.redports.org/buildarchive/r352693/

Log:
  Fix-up a bug in the new code, which prevented safe-interpreters from using even the already opened file-handles.
  
  Bump PORTREVISION.
  
  Reviewed by:	John Ellson (upstream maintainer)

Modified:
  head/graphics/gdtclft/Makefile
  head/graphics/gdtclft/files/patch-improve

Modified: head/graphics/gdtclft/Makefile
==============================================================================
--- head/graphics/gdtclft/Makefile	Wed Apr 30 17:31:29 2014	(r352692)
+++ head/graphics/gdtclft/Makefile	Wed Apr 30 17:43:50 2014	(r352693)
@@ -3,7 +3,7 @@
 
 PORTNAME=	Gdtclft
 PORTVERSION=	2.2.5
-PORTREVISION=	12
+PORTREVISION=	13
 CATEGORIES=	graphics tcl
 MASTER_SITES=	
 DISTNAME=	${PORTNAME}${PORTVERSION}

Modified: head/graphics/gdtclft/files/patch-improve
==============================================================================
--- head/graphics/gdtclft/files/patch-improve	Wed Apr 30 17:31:29 2014	(r352692)
+++ head/graphics/gdtclft/files/patch-improve	Wed Apr 30 17:43:50 2014	(r352693)
@@ -302,7 +302,7 @@ Use freely and get yourself a pademelon.
 +				if (2+subcmdVec[subi].subcmds+subcmdVec[subi].ishandle > (unsigned)argc) {
  					Tcl_SetResult(interp, "GD handle(s) not specified", TCL_STATIC);
  					return TCL_ERROR;
-@@ -369,12 +392,26 @@
+@@ -369,12 +392,27 @@
  							  subcmdVec[subi].ishandle);
  					  argi++) {
 -					if (! gdHandleXlate(interp, gdData->handleTbl, 
@@ -321,10 +321,11 @@ Use freely and get yourself a pademelon.
 +			if (clientData != NULL && subcmdVec[subi].unsafearg != 0) {
 +				const char *fname =
 +				    Tcl_GetString(objv[subcmdVec[subi].unsafearg]);
-+				if (!Tcl_IsChannelExisting(fname))
-+				Tcl_AppendResult(interp, "Access to ", fname,
-+				    " not allowed in safe interpreter", TCL_STATIC);
-+				return TCL_ERROR;
++				if (!Tcl_IsChannelExisting(fname)) {
++					Tcl_AppendResult(interp, "Access to ", fname,
++					    " not allowed in safe interpreter", TCL_STATIC);
++					return TCL_ERROR;
++				}
 +			}
 +
  			/* Call the subcommand function. */



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