msgpack / msgpack-ruby

MessagePack implementation for Ruby / msgpack.org[Ruby]
http://msgpack.org/
Apache License 2.0
764 stars 117 forks source link

Zero-out msgpack_buffer_chunk_t after allocation #342

Closed casperisfine closed 1 year ago

casperisfine commented 1 year ago

Fix: https://github.com/msgpack/msgpack-ruby/issues/341

These struct contain a VALUE reference so if we don't zero it out, it could be pointing at a T_NONE or some other old object slot.

Especially since we can re-use existing chunks.

cc @peterzhu2118 @pavel-workato