Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-19
03:14 • Ticket [218910ffff] Unprotected "gets" in http2.1 package status s... artifact: 5c2fb07860 user: dgp
2000-10-26
08:31 • Deleted ticket [218910ffff]. artifact: 3df2fd16de user: welch
01:07 • New ticket [218910ffff]. artifact: b887288f0f user: nobody

Unprotected "gets" in http2.1 package

Deleted218910ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:07:47
OriginalBugID: 2665 Bug
Version: 8.2
SubmitDate: '1999-08-31'
LastModified: '1999-10-19'
Severity: CRIT
Status: Released
Submitter: techsupp
ChangedBy: hobbs
OS: Solaris
Machine: Other
FixedDate: '1999-10-19'
FixedInVersion: 8.2.2
ClosedDate: '2000-10-25'


Name:

Q. Alex Zhao



Extensions:

none



CustomShell:

none



ReproducibleScript:

It was something like:

    catch {::http::geturl "http://slashdot.org/" -timeout 60000 -command

    handleData}

    But the network was unstable and painfully slow.



ObservedBehavior:

The application-defined timeout didn't happen, and the -command script

    was not called. Instead, the http package had an error and crashed the

    application:

    

    error reading "sock8": connection timed out

        while executing

    "gets $s line"

        (procedure "http::Event" line 11)

        invoked from within

    "http::Event ::http::304"



DesiredBehavior:

The http (2.1) package should catch the error, and call the -command

    script (if it exists). A close look at the http2.1 package shows that in

    "http::Event" around code line 9:

    

        if {$state(state) == "header"} {

            set n [gets $s line]

            if {$n == 0} {

    

    The "set n [gets $s line]" should be changed to something like

    if {[catch {set n [gets $s line]} err]} {Finish $token $err}





Fix applied for 8.3b1. 
-- 10/19/1999 hobbs
welch Deleted ticket [218910ffff]. [History diff]2000-10-26 08:31:16
dgp Ticket [218910ffff]: 4 changes [History diff]2001-04-19 03:14:37
Log in (anonymous is fine) to add a comment.