Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2ed10c613036eedc1533a591f125735e1bdae7965674e76ddb009bfd1613a20f
Ticket: 1b803e48af8b218f64b9421d5f5be137fa967863
Possible overread in Tcl_ZlibInflate()
User & Date: jan.nijtmans on 2026-11-13 14:23:12
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    in tclZlib.c, line 1876:
    <pre>
        stream.avail_in = inLen+1; /* +1 because zlib can "over-request"
                                    * input (but ignore it!) */
    </pre>
    
    The data buffer is retreived from Tcl_GetBytesFromObj()  (line 1808), but the array returned here is NOT generally null-terminated. Is this "+1" really needed? My guess is that it might have been needed in an old (buggy) zlib version, but those kind of bugs are fixed already long ago. We shouldn't do that any more.
    
    Let's see if removing the "+1" breaks anything.
    
  5. foundin changed to: "all"
  6. is_private changed to: "0"
  7. login: "jan.nijtmans"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "0c50e5320704d174412e57b873d8932de15303e0"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "jan.nijtmans"
  14. subsystem changed to: "- New Builtin Commands"
  15. title changed to: "Possible overread in Tcl_ZlibInflate()"
  16. type changed to: "Bug"