summaryrefslogtreecommitdiffstats
path: root/generic/tkTextTag.c
diff options
context:
space:
mode:
authorkjnash <k.j.nash@usa.net>2017-06-13 18:15:46 (GMT)
committerkjnash <k.j.nash@usa.net>2017-06-13 18:15:46 (GMT)
commit0d8755e7bb74882ca10bb7cbde4fb4097cb2cc51 (patch)
tree0783d7c109ac2b5667533b5299d32a80deb45d8c /generic/tkTextTag.c
parentd28664f9b1810d40530b09cdcb91eddede0f298d (diff)
downloadtk-0d8755e7bb74882ca10bb7cbde4fb4097cb2cc51.zip
tk-0d8755e7bb74882ca10bb7cbde4fb4097cb2cc51.tar.gz
tk-0d8755e7bb74882ca10bb7cbde4fb4097cb2cc51.tar.bz2
Test whether in a safe interpreter before writing to the PRIMARY selection. Fixes bug [de156e9efe]. Ready for testing.
Diffstat (limited to 'generic/tkTextTag.c')
-rw-r--r--generic/tkTextTag.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c
index d9329f5..9ade3ad 100644
--- a/generic/tkTextTag.c
+++ b/generic/tkTextTag.c
@@ -243,6 +243,7 @@ TkTextTagCmd(
TkTextSelectionEvent(textPtr);
if (addTag && textPtr->exportSelection
+ && (!Tcl_IsSafe(textPtr->interp))
&& !(textPtr->flags & GOT_SELECTION)) {
Tk_OwnSelection(textPtr->tkwin, XA_PRIMARY,
TkTextLostSelection, textPtr);