rocksdb/env
Zhichao Cao 2adb7e3768 Fix potential overflow of unsigned type in for loop (#6902)
Summary:
x.size() -1 or y - 1 can overflow to an extremely large value when x.size() pr y is 0 when they are unsigned type. The end condition of i in the for loop will be extremely large, potentially causes segment fault. Fix them.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6902

Test Plan: pass make asan_check

Reviewed By: ajkr

Differential Revision: D21843767

Pulled By: zhichao-cao

fbshipit-source-id: 5b8b88155ac5a93d86246d832e89905a783bb5a1
2020-06-02 15:05:07 -07:00
..
composite_env_wrapper.h Add IsDirectory() to Env and FS (#6711) 2020-04-17 14:39:18 -07:00
env.cc Pass IOStatus to write path and set retryable IO Error as hard error in BG jobs (#6487) 2020-03-27 16:04:43 -07:00
env_basic_test.cc Update googletest from 1.8.1 to 1.10.0 (#6808) 2020-06-01 20:33:42 -07:00
env_chroot.cc Cache result of GetLogicalBufferSize in Linux (#6457) 2020-03-11 18:40:05 -07:00
env_chroot.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
env_encryption.cc Add counter in perf_context to time cipher time (#6596) 2020-04-01 16:59:35 -07:00
env_hdfs.cc Add IsDirectory() to Env and FS (#6711) 2020-04-17 14:39:18 -07:00
env_posix.cc Simplify migration to FileSystem API (#6552) 2020-03-23 21:54:21 -07:00
env_test.cc Fix potential overflow of unsigned type in for loop (#6902) 2020-06-02 15:05:07 -07:00
file_system.cc Pass IOStatus to write path and set retryable IO Error as hard error in BG jobs (#6487) 2020-03-27 16:04:43 -07:00
fs_posix.cc Add IsDirectory() to Env and FS (#6711) 2020-04-17 14:39:18 -07:00
io_posix.cc Status check enforcement for io_posix_test and options_settable_test (#6857) 2020-05-19 19:22:28 -07:00
io_posix.h Cache result of GetLogicalBufferSize in Linux (#6457) 2020-03-11 18:40:05 -07:00
io_posix_test.cc Status check enforcement for io_posix_test and options_settable_test (#6857) 2020-05-19 19:22:28 -07:00
mock_env.cc Fix FilterBench when RTTI=0 (#6732) 2020-04-29 13:09:23 -07:00
mock_env.h Attempt to recover from db with missing table files (#6334) 2020-03-20 19:30:48 -07:00
mock_env_test.cc Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00