Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 27c804f4d49a56d11d036e14cdfdca4079687ffe8b9d3670c7988b3ad229e43c
Ticket: c61818e4c9b710bdf9f947c1a40563aeab85357a
Tcl_UtfPrev flaws
User & Date: dgp on 2020-04-08 22:43:14
Changes

  1. icomment:
    
    By contrast the few callers who are trying to use Tcl_UtfPrev as a reliable
    backward iterator over characters in a string are all no more vulnerable to
    failure because of malformed byte sequences than they already were.
    
    As long as we continue to semi-tolerate broken string input data, these
    routines will break handling them. They already did. They still will under
    this proposed bug fix.
    
    The safety feature of Tcl_UtfPrev(src, start) that it will never return a 
    pointer earlier than start gives us good confidence it is not going to lead
    to pointer accesses out of bounds.
    
  2. login: "dgp"
  3. mimetype: "text/plain"