Skip to content

Zlib InflateRaw null reference #6034

Description

@headlessme
  • Version: v5.10.0 (also seen on 4.3.0)
  • Platform: Darwin Kernel Version 14.5.0
  • Subsystem: zlib

Zlib references a null object on close after an error:

var zlib = require('zlib');
var inflate = zlib.createInflateRaw(15);
inflate.on('error', function(e) {  });
inflate.write('something invalid');
setTimeout(function(){
    inflate.close();  
}, 100);

Output:

$ node inflate-close.js 
zlib.js:465
  this._handle.close();
              ^

TypeError: Cannot read property 'close' of null
    at InflateRaw.Zlib.close (zlib.js:465:15)
    at null._onTimeout (/tmp/inflate-close.js:8:13)
    at Timer.listOnTimeout (timers.js:92:15)

See websockets/ws#664

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateIssues and PRs that are duplicates of other issues or PRs.zlibIssues and PRs related to the zlib module and its compression dependencies.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions