Skip to content

ts: refactor decoding DER#1045

Merged
rhenium merged 2 commits into
ruby:masterfrom
rhenium:ky/ts-d2i-avoid-reuse
May 29, 2026
Merged

ts: refactor decoding DER#1045
rhenium merged 2 commits into
ruby:masterfrom
rhenium:ky/ts-d2i-avoid-reuse

Conversation

@rhenium
Copy link
Copy Markdown
Member

@rhenium rhenium commented Apr 29, 2026

Do not rely on the "reuse" behavior of d2i_*{,_bio}() functions which has been discouraged in the man page. This also fixes a potential memory leak reported in #1011.

@rhenium rhenium force-pushed the ky/ts-d2i-avoid-reuse branch from 8efe057 to 0b7debd Compare April 29, 2026 16:43
rhenium added 2 commits May 29, 2026 17:34
The man page discourages using this behavior because it may leave the
object in an inconsistent state on error paths. This fixes a potential
memory leak reported at <ruby#1011>.
Also, avoid using the "reuse" behavior of d2i_*{,_bio}() functions.
@rhenium rhenium force-pushed the ky/ts-d2i-avoid-reuse branch from 0b7debd to 3f1a7a3 Compare May 29, 2026 08:35
@rhenium rhenium merged commit 5677234 into ruby:master May 29, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memory leak due to incomplete error handling when d2i_TS_RESP_bio() fails

1 participant