Avoid potential negative array index access to cached text.
[LibreOffice.git] / external / breakpad / c++20-allocator.patch
blob245fac9e22c3a0993239f7c821dcf8f64d6be028
1 diff -u -p -d -N -r breakpad.sav/src/common/memory_allocator.h breakpad/src/common/memory_allocator.h
2 --- src/common/memory_allocator.h 2021-04-07 19:12:50.357462734 +0200
3 +++ src/common/memory_allocator.h 2021-04-07 19:45:05.490291766 +0200
4 @@ -161,7 +161,7 @@ class PageAllocator {
5 // Wrapper to use with STL containers
6 template <typename T>
7 struct PageStdAllocator : public std::allocator<T> {
8 - typedef typename std::allocator<T>::pointer pointer;
9 + typedef T* pointer;
10 typedef typename std::allocator<T>::size_type size_type;
12 explicit PageStdAllocator(PageAllocator& allocator) : allocator_(allocator),