Tcl Library Source Code

View Ticket
Login
Ticket UUID: 6c1c739c78301a9eccab379399d401c4b6af09a
Title: dns package overwrites global variables
Type: Bug Version: trunk
Submitter: anonymous Created on: 2014-05-13 17:56:59
Subsystem: dns Assigned To: aku
Priority: 7 High Severity: Severe
Status: Closed Last Modified: 2014-05-14 23:16:17
Resolution: Fixed Closed By: aku
    Closed on: 2014-05-14 23:16:17
Description:
Doing a "package require dns" will overwrite any existing global variables with the following names: escape host hostOrPort class type classOrType classOrTypeSpec query

The uri::register in dns.tcl unsafely uses "set" instead of "variable" for these variable names, which is not safe to global variables even when being run inside a namespace eval.

You can reproduce this bug with the following Tcl code:

   set ::class "test"
   puts "::class is $::class"
   package require dns
   puts "::class is $::class"

Patch provided, will attach.
User Comments: aku added on 2014-05-14 23:16:17:
Thank you for the report and fix.
Applied.
Additionally bumped package version to 1.3.4.
Committed to revision [55876840bd].
Pushed.

Attachments: