From c8bb79978e287d991897e98a539a92e6b744f14e Mon Sep 17 00:00:00 2001 From: Lei Jin Date: Fri, 28 Mar 2014 16:21:42 -0700 Subject: [PATCH] fix the buffer overflow in dynamic_bloom_test Summary: int -> uint64_t Test Plan: it think it is pretty obvious will run asan_check before committing Reviewers: igor, haobo Reviewed By: igor CC: leveldb Differential Revision: https://reviews.facebook.net/D17241 --- util/dynamic_bloom_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/dynamic_bloom_test.cc b/util/dynamic_bloom_test.cc index d9ececa5a..e8bbc38e1 100644 --- a/util/dynamic_bloom_test.cc +++ b/util/dynamic_bloom_test.cc @@ -69,7 +69,7 @@ static uint32_t NextNum(uint32_t num) { } TEST(DynamicBloomTest, VaryingLengths) { - char buffer[sizeof(int)]; + char buffer[sizeof(uint64_t)]; // Count number of filters that significantly exceed the false positive rate int mediocre_filters = 0;