Skip to content

Reject non-Proc callbacks in Packer#register_type_internal - #413

Closed
eightbitraptor wants to merge 1 commit into
msgpack:masterfrom
eightbitraptor:master
Closed

eightbitraptor wants to merge 1 commit into
msgpack:masterfrom
eightbitraptor:master

Conversation

@eightbitraptor

Copy link
Copy Markdown
Contributor

the Packer invokes callbacks with rb_proc_call_with_block which doesn't do any type checking that the proc is actually a proc, so it's possible for an oject that's not a proc to reach rb_vm_invoke_proc and be treated as an rb_proc_t.

This commit adds a type check and raise to register_type_internal.

the Packer invokes callbacks with rb_proc_call_with_block which doesn't
do any type checking that the proc is actually a proc, so it's possible
for an oject that's not a proc to reach rb_vm_invoke_proc and be treated
as an rb_proc_t.

This commit adds a type check and raise to register_type_internal.
@byroot

byroot commented Nov 19, 2026

Copy link
Copy Markdown
Member

Thanks, the JRuby version need updating too.

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.

2 participants