Commit ceace1f9 authored by Ben Noordhuis's avatar Ben Noordhuis Committed by Rich Trott
Browse files

crypto: handle i2d_SSL_SESSION() error return

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

PR-URL: https://github.com/nodejs/node/pull/29225


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 6726f567
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment