Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4b282ca1b4025643591074bec342863407219be2
Ticket: 478c446889d74995ad6e0ac0b5602c01d7e215d9
zlib inflate leaking memory on Z_STREAM_ERROR condition
User & Date: bovine on 2015-06-10 18:06:51
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    In Tcl_ZlibInflate of generic/tclZlib.c there is this error block:
    
    	if ((stream.avail_in == 0) && (stream.avail_out > 0)) {
    	    e = Z_STREAM_ERROR;
    	    goto error;
    	}
    
    I believe that needs to call inflateEnd(&stream) before the goto to avoid leaking zlib memory structures. This leak would only occur if you are trying to decompress corrupted/incomplete data a lot.
    
  5. foundin changed to: "8.6.3"
  6. is_private changed to: "0"
  7. login: "bovine"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "f0e2312a244c99b69b66ff52a743015292c5af63"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "bovine"
  14. subsystem changed to: "57. zlib"
  15. title changed to:
    zlib inflate leaking memory on Z_STREAM_ERROR condition
    
  16. type changed to: "Bug"