swh:1:snp:5115096b921df712aeb2a08114fede57fb3331fb
Revision e5ae1bb46564689e56a38f3509daffa4aca3b29c authored by Daniel Black on 27 June 2018, 19:09:50 UTC, committed by Facebook Github Bot on 27 June 2018, 19:23:07 UTC
Summary:
Various rearrangements of the cch maths failed or replacing = '\0' with
memset failed to convince the compiler it was nul terminated. So took
the perverse option of changing strncpy to strcpy.

Return null if memory couldn't be allocated.

util/status.cc: In static member function ‘static const char* rocksdb::Status::CopyState(const char*)’:
util/status.cc:28:15: error: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
   std::strncpy(result, state, cch - 1);
   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
util/status.cc:19:18: note: length computed here
       std::strlen(state) + 1; // +1 for the null terminator
       ~~~~~~~~~~~^~~~~~~
cc1plus: all warnings being treated as errors
make: *** [Makefile:645: shared-objects/util/status.o] Error 1

closes #2705
Closes https://github.com/facebook/rocksdb/pull/3870

Differential Revision: D8594114

Pulled By: anand1976

fbshipit-source-id: ab20f3a456a711e4d29144ebe630e4fe3c99ec25
1 parent a16e00b
History
Tip revision: 19076c95aa2bcee55c26fcf0960cc844ad86ee9c authored by Levi Tamasi on 21 January 2021, 22:18:25 UTC
Update HISTORY.md for PR 7888 (#7890)
Tip revision: 19076c9
File Mode Size
buckifier
build_tools
cache
cmake
coverage
db
docs
env
examples
hdfs
include
java
memtable
monitoring
options
port
table
third-party
tools
util
utilities
.clang-format -rw-r--r-- 138 bytes
.gitignore -rw-r--r-- 705 bytes
.lgtm.yml -rw-r--r-- 67 bytes
.travis.yml -rw-r--r-- 3.2 KB
AUTHORS -rw-r--r-- 322 bytes
CMakeLists.txt -rw-r--r-- 35.7 KB
CODE_OF_CONDUCT.md -rw-r--r-- 249 bytes
CONTRIBUTING.md -rw-r--r-- 706 bytes
COPYING -rw-r--r-- 17.7 KB
DEFAULT_OPTIONS_HISTORY.md -rw-r--r-- 1.5 KB
DUMP_FORMAT.md -rw-r--r-- 763 bytes
HISTORY.md -rw-r--r-- 62.0 KB
INSTALL.md -rw-r--r-- 7.4 KB
LANGUAGE-BINDINGS.md -rw-r--r-- 904 bytes
LICENSE.Apache -rw-r--r-- 11.1 KB
LICENSE.leveldb -rw-r--r-- 1.5 KB
Makefile -rw-r--r-- 64.6 KB
README.md -rw-r--r-- 1.8 KB
ROCKSDB_LITE.md -rw-r--r-- 1.0 KB
TARGETS -rw-r--r-- 26.9 KB
USERS.md -rw-r--r-- 5.3 KB
Vagrantfile -rw-r--r-- 1017 bytes
WINDOWS_PORT.md -rw-r--r-- 12.5 KB
appveyor.yml -rw-r--r-- 428 bytes
issue_template.md -rw-r--r-- 243 bytes
src.mk -rw-r--r-- 29.5 KB
thirdparty.inc -rw-r--r-- 7.7 KB

README.md

back to top