Possible overread in Tcl_ZlibInflate()
Closed / Fixed1b803e48af8b218f64b9421d5f5be137fa967863Created 20 days agoUpdated 14 days ago
Descriptionwiki2026-11-13 14:23:12
in tclZlib.c, line 1876:
stream.avail_in = inLen+1; /* +1 because zlib can "over-request"
* input (but ignore it!) */
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.
jan.nijtmanswiki2026-11-20 08:02:34
Merge to [trunk], core-9-0-branch and core-8-6-branch
Log in (anonymous is fine) to add a comment.