Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9459e10bccd31d0ddb3dd485118592377c2134165115ef29430486640a4665a5
Ticket: c9663296fd31fbb2fa1ff1cf019b59f432983516
GrowStringBuffer and GrowUnicodeBuffer do not check for overflows
User & Date: apnadkarni on 2023-05-06 02:23:06
Changes

  1. icomment:
    Christopher, with respect to [69b4f7eb37], yes that is a little different because it expects to read a certain number and sets the Tcl_Obj buffer to that length.
    
    However, one of the comments in that ticket talks about the fallback to actual requested size (TCL_MIN_GROWTH etc.). This patch addresses that to some extent as well. If the initial overallocation fails, the fallback now uses a "binary search" kind of mechanism to over allocate. There is of course a trade off there as multiple attempts will be made instead of a single additional attempt.
    
    /Ashok
    
  2. login: "apnadkarni"
  3. mimetype: "text/x-fossil-plain"