From 74d91756c11bc22f9b0108b94da9326f7f9e376f Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Wed, 3 Jul 2019 12:13:04 -0700 Subject: Export of internal Abseil changes. -- a874475e842d2adeb31bb7bd37bdd6eb15a2aeb9 by Mark Barolak : Import of CCTZ from GitHub. PiperOrigin-RevId: 256414250 -- c95e6c21944c59c9b9b9e7eb9dc79cfb9ae5ef8d by CJ Johnson : Update the license year + run clang-format for the FixedArray and InlinedVector test files PiperOrigin-RevId: 256376285 -- f430b04f332d6b89cb8447b07217e391e1c38000 by Derek Mauro : Migrate the Linux CMake tests from GCC 4.8 to the GCC latest version. This will allow us to delete the GCC 4.8 test since that is currently our only CMake coverage. This also means that we don't have to update the script every time we move to a new minumum GCC version. This change includes a fix for a -Wstringops-truncation warning in symbolize_test.cc that triggers when it is built in release mode with the latest GCC. PiperOrigin-RevId: 256370092 GitOrigin-RevId: a874475e842d2adeb31bb7bd37bdd6eb15a2aeb9 Change-Id: Ia2ec58f9b9dfc382d043344e346cb397b802270a --- absl/debugging/symbolize_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'absl/debugging') diff --git a/absl/debugging/symbolize_test.cc b/absl/debugging/symbolize_test.cc index fc3ed93e3953..08068c307fdd 100644 --- a/absl/debugging/symbolize_test.cc +++ b/absl/debugging/symbolize_test.cc @@ -107,7 +107,8 @@ static const char *TrySymbolizeWithLimit(void *pc, int limit) { ABSL_RAW_CHECK(strnlen(heap_buffer.get(), limit) < limit, "absl::Symbolize() did not properly terminate the string"); strncpy(try_symbolize_buffer, heap_buffer.get(), - sizeof(try_symbolize_buffer)); + sizeof(try_symbolize_buffer) - 1); + try_symbolize_buffer[sizeof(try_symbolize_buffer) - 1] = '\0'; } return found ? try_symbolize_buffer : nullptr; -- cgit 1.4.1