mirror of
https://github.com/facebook/rocksdb.git
synced 2026-07-07 14:47:40 +08:00
8fae7ff39d
Summary: ### Embedded Blob Resolving Iterator Fix #### Use-After-Free Bug Fix This diff fixes a use-after-free bug in the `EmbeddedBlobResolvingIterator` class. The bug occurred when the `key()` method was called before the `value()` method, causing the `resolved_internal_key_` buffer to be freed prematurely. #### Changes The fix involves modifying the `EmbeddedBlobResolvingIterator` class to ensure that the `resolved_key` is not moved into `resolved_internal_key_` if it has already been resolved (`key_resolved_` flag is set to `true`). This prevents the `resolved_internal_key_` buffer from being overwritten and freed when `MaterializeValue()` is called. Reviewed By: xingbowang Differential Revision: D109796428 fbshipit-source-id: d89fb36428ba62e8d0be53c2acfa3cdb9bda76f4