Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3980a36232f91fbd10e7bfaa7b825818909369f9c697e98ef62db7cf8a661b56
Ticket: 5e6346a252a3e52f764f6a58e7c52cfc72b4a061
Tcl_UtfPrev does not account for rejecting overlong sequences
User & Date: jan.nijtmans on 2020-04-15 19:06:24
Changes

  1. icomment:
    I'm guilty as charged ....  :-).    This behavior is backported from 8.7, and - since this handles an invalid byte sequence - it can only be triggered by carefully crafted native code, not from a pure Tcl script.
    
    That said, Tcl_UtfPrev() and Tcl_UtfNext() don't behave well in all situations, mainly when invalid byte-sequences are involved. You are showing that with a lot of test-cases. That's great, and something I appreciate you are doing.
    
    Does the [bug-31aa44375d] branch solve this for you?  I think not for 100%, because some of the fixes you did in a branch derived from 8.5 are not ported forward yet. Since Tcl 8.6.7 is 2 1/2 years old, and no-one filed a bug-report on this, I don't understand your "Important", but so be it.
    
    If you are satisfied with the [bug-31aa44375d] branch, then feel free to merge it to core-8-6-branch. I won't resist. Since I didn't file a TIP for 8.6, I don't have enough ground below me to stand on.
    
  2. login: "jan.nijtmans"
  3. mimetype: "text/plain"