Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b887288f0faf75a619b7d8e465339d1dd15017f4
Ticket: 218910ffffffffffffffffffffffffffffffffff
Unprotected "gets" in http2.1 package
User & Date: nobody on 2000-10-26 01:07:47
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    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
    
  4. foundin changed to: "obsolete: 8.2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "Unprotected "gets" in http2.1 package"
  11. type changed to: "Bug"