Tcl Source Code

View Ticket
Login
EuroTcl/OpenACS 11 - 12 JULY 2024, VIENNA
Ticket UUID: 767e070d35e89c53c88f7f4d01c30249ea82466
Title: Tcl_GetRange and Tcl_GetUniChar do not validate index inputs
Type: Bug Version: all
Submitter: dgp Created on: 2020-03-13 16:44:42
Subsystem: 10. Objects Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2020-03-28 17:25:18
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2020-03-28 17:25:18
Description:
Documentation says nothing about it, but the comments in the code note:

"The index is assumed to be in the appropriate range."

"The first and last indices are assumed to be in the appropriate range."

This is a burden on the caller that should at least be documented.

Arguably worse, since the check is not done, the operations of the routines
are then free to access unrestrained memory, which seems a risk at least.
User Comments: jan.nijtmans added on 2020-03-28 17:24:57:
Fixed in 8.6 (backported from 8.7)