Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8222f3b372fb63d3db2c771bbdb5a62e3130c22869cc044ffc38f8f3db3792b2
Ticket: 35a8f1c04a9c1610b250f97b9361c35fadc583de
List command can used to read beyond bounds of input
User & Date: tuckerowens on 2018-11-08 21:47:57
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    I cannot say I entirely know what is going wrong, only that I know it's incorrect.
    
    Run the following in a Tcl shell:  
    
    <code>
    puts "[list {#"""}]"
    </code>
    
    It seems like the Tcl interpreter is mishandling the literal <code>#"""</code> inside the curly braces which results in extra data to be appended to the output. I've found through experimentation that the string must start with a <code>#</code> and the number of quotes (must be greater than two) is proportional to the amount of additional data which follows the output.
    
    In trials it was common for null characters to be printed, which depending on your shell might not show up, so you may need to convert the output to hex. 
    
    Here are some examples:
    
    <pre> 
    % info tclversion
    8.5
    % list {#""""""""""""""""""""""""""""""""""""""""""""""""""""""}
    {#""""""""""""""""""""""""""""""""""""""""""""""""""""""}  auto_index(::tcl::tm::roots) [list source [file joi
    % list {#""""""""""""""""""""""""""""""""""""""""""""""""""""""}
    {#""""""""""""""""""""""""""""""""""""""""""""""""""""""} tïtcl]]
    
    % list {#""""""""""""""""""""""""""""""""""""""""""""""""""""""}
    {#""""""""""""""""""""""""""""""""""""""""""""""""""""""} ïHÕ Ðï
    % list {#""""""""""""""""""""""""""""""""""""""""""""""""""""""}
    {#""""""""""""""""""""""""""""""""""""""""""""""""""""""} ï
    </pre>
    
  5. foundin changed to: "8.5"
  6. is_private changed to: "0"
  7. login: "tuckerowens"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "fbb85fed96b7b84e176a1b3c162e873b26d6b66b"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "tuckerowens"
  14. subsystem changed to: "17. Commands I-L"
  15. title changed to:
    List command can used to read beyond bounds of input
    
  16. type changed to: "Bug"