Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5648b319c4f12a8524b81a124c8b3244b89875c04c912418f66124db708f50c9
Ticket: 819f7040535f7f1c9857d447680fda1df83c48c3
TclGetUnicodeFromObj doesn't handle numChars > INT_MAX
User & Date: dgp on 2021-11-06 18:11:11
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
     
    Line 617 of tclStringObj.c:
    
           *lengthPtr = (int)stringPtr->numChars;
    
    The cast might make type-checking compilers happy,
    but it will not handle the case when stringPtr->numChars > INT_MAX
    in any way that can be considered sensible.
    
    My first guess is we ought to panic.  You can't use a constrained
    interface to fetch a value not within that constraint.
    
  5. foundin changed to: "trunk"
  6. is_private changed to: "0"
  7. login: "dgp"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Minor"
  11. status changed to: "Open"
  12. submitter changed to: "dgp"
  13. subsystem changed to: "10. Objects"
  14. title changed to:
    TclGetUnicodeFromObj doesn't handle numChars > INT_MAX
    
  15. type changed to: "Bug"