Skip to content

crypto: handle i2d_SSL_SESSION() error return

Rodrigo Muino Tomonari requested to merge github/fork/bnoordhuis/fix29202 into master

i2d_SSL_SESSION() can return a value <= 0 when the session is malformed or otherwise invalid. Handle that case.

This change comes without a regression test because I couldn't figure out a good way to generate an existing but invalid session in a timely fashion.

Fixes: https://github.com/nodejs/node/issues/29202

Merge request reports

Loading