Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8e77e0a22ed0b40b3b4556ada62effe740d498f9c093d72a0cf80094e8d3286c
Ticket: e56486a257f75d5f413d52b22b49fa8c428f3806
Improper comparison with TCL_INDEX_NONE to indicate null-terminated strings
User & Date: apnadkarni on 2025-11-12 06:30:01
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-markdown"
  4. comment changed to:
    String length parameters to several C functions are documented (in both 8.6  and 9.0) as *If the length is negative, the encoding-specific length of the string is used.*
    
    While 8.6 correctly checked for negative lengths as `(srcLen < 0)`, this has been changed in 9.0 to `(srcLen == TCL_INDEX_NONE)`. Aside from changing the **documented** semantics, this also has resulted in the functions not handling the case of negative values other than -1.
    
    The checks should be reverted back to checking for negative values as opposed to checking for `TCL_INDEX_NONE`.
    
  5. foundin changed to: "9.0"
  6. is_private changed to: "0"
  7. login: "apnadkarni"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "9546e9877f1a8899e25a89082561ee694e7fb402"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "apnadkarni"
  14. subsystem changed to: "- New Builtin Commands"
  15. title changed to:
    Improper comparison with TCL_INDEX_NONE to indicate null-terminated strings
    
  16. type changed to: "Bug"