Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0c49068132348edae639e443779f48667823b56a8dbb421d7e19b1b34af621d5
Ticket: ed29806bafd93096f71fb55248258138125805a6
Tcl_UtfToUniChar reads more than TCL_UTF_MAX bytes
User & Date: jan.nijtmans on 2020-04-30 12:23:33
Changes

  1. assignee changed to: "jan.nijtmans"
  2. icomment:
    Not a 100% fix yet, but some improvement is possible without disturbing anything. Most code in Tcl_UtfToUniChar() is just validity checks, checking if src[3] is valid is just one of them. We can do the validity check for src[3] after all other validity checks that can be done on src[0], src[1] and src[2]. At least, the probability that this leads to a crash (however small already) becomes even smaller.
    
    B.T.W.: Tcl 8.7 (the core-8-branch) has the same issue!
    
    This is not all, more can be said about it. This first paritial fix is done in commit [98f53342750c9020], but I will come back to this issue later.
    
  3. login: "jan.nijtmans"
  4. mimetype: "text/x-fossil-wiki"