From c763970de6e749123af76170c16bbc3929058437 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 11 Apr 2018 21:18:38 +0000 Subject: Fix issues with PDFium third_party/base/span.h Remove stray const in operator[] that was introduced when downgrading from C++14 to C++11 syntax. Add missing Get() in first() that was introduced when converting to UnownedPtr. Prevent ASAN from flagging spans where the UnownedPtr points to byte N+1 of a N byte object, and the span is empty. This is legal in C for ordinary pointers so long as the pointer isn't de-referenced, but is not allowed per the rules for UnownedPtr. Change-Id: Ic143c5ef4e37c1cf86f0a3e5408be6e2076a85e2 Reviewed-on: https://pdfium-review.googlesource.com/30212 Commit-Queue: Tom Sepez Reviewed-by: dsinclair --- BUILD.gn | 1 + 1 file changed, 1 insertion(+) (limited to 'BUILD.gn') diff --git a/BUILD.gn b/BUILD.gn index 6dc1de38ee..36ee859264 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -2905,6 +2905,7 @@ test("pdfium_unittests") { "core/fxcrt/fx_system_unittest.cpp", "core/fxcrt/maybe_owned_unittest.cpp", "core/fxcrt/observable_unittest.cpp", + "core/fxcrt/pdfium_span_unittest.cpp", "core/fxcrt/retain_ptr_unittest.cpp", "core/fxcrt/shared_copy_on_write_unittest.cpp", "core/fxcrt/string_pool_template_unittest.cpp", -- cgit v1.2.3