diff options
author | Mikhail Teterin <mi@FreeBSD.org> | 2014-04-30 17:43:50 +0000 |
---|---|---|
committer | Mikhail Teterin <mi@FreeBSD.org> | 2014-04-30 17:43:50 +0000 |
commit | 61e24ef5826e4374a3f64bbc9dd29d4c81fb31c6 (patch) | |
tree | 98f9902f8ab7e67295650cc250b7b034fc1c8871 /graphics/gdtclft/files/patch-improve | |
parent | - update to v10.30 (diff) |
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)
Notes
Notes:
svn path=/head/; revision=352693
Diffstat (limited to 'graphics/gdtclft/files/patch-improve')
-rw-r--r-- | graphics/gdtclft/files/patch-improve | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/graphics/gdtclft/files/patch-improve b/graphics/gdtclft/files/patch-improve index 36b3bd4304b0..f2700dc59ea1 100644 --- a/graphics/gdtclft/files/patch-improve +++ b/graphics/gdtclft/files/patch-improve @@ -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. */ |