]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Fix a buffer overrun problem in BlockBasedTable::MultiGet (#6014)
authoranand76 <anand76@devvm1373.frc2.facebook.com>
Tue, 12 Nov 2019 00:57:49 +0000 (16:57 -0800)
committeranand76 <anand76@devvm1373.frc2.facebook.com>
Tue, 12 Nov 2019 18:57:32 +0000 (10:57 -0800)
commitcb1dc296551e01f33bdba8ba55f5fe73654269fc
treef824ef033a29407368d70e0ad9239bce271b3c33
parent98e5189fb019b15c9f90c8a468a79543d274bfe5
Fix a buffer overrun problem in BlockBasedTable::MultiGet (#6014)

Summary:
The calculation in BlockBasedTable::MultiGet for the required buffer length for reading in compressed blocks is incorrect. It needs to take the 5-byte block trailer into account.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6014

Test Plan: Add a unit test DBBasicTest.MultiGetBufferOverrun that fails in asan_check before the fix, and passes after.

Differential Revision: D18412753

Pulled By: anand1976

fbshipit-source-id: 754dfb66be1d5f161a7efdf87be872198c7e3b72
HISTORY.md
db/db_basic_test.cc
table/block_based/block_based_table_reader.cc
table/block_based/block_based_table_reader.h
table/format.h