Put two more instances of std::vector<wchar_t> into the partition.
Change-Id: Id91dd9af67b013e18b9eae70c09d35d9de55aafc
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/62671
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fpdfdoc/cpdf_bookmark.cpp b/core/fpdfdoc/cpdf_bookmark.cpp
index 7f7958b..96752af 100644
--- a/core/fpdfdoc/cpdf_bookmark.cpp
+++ b/core/fpdfdoc/cpdf_bookmark.cpp
@@ -13,6 +13,7 @@
#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_string.h"
#include "core/fpdfdoc/cpdf_nametree.h"
+#include "core/fxcrt/fx_memory_wrappers.h"
#include "core/fxge/fx_dib.h"
CPDF_Bookmark::CPDF_Bookmark() = default;
@@ -40,7 +41,7 @@
if (!len)
return WideString();
- std::vector<wchar_t> buf(len);
+ std::vector<wchar_t, FxAllocAllocator<wchar_t>> buf(len);
for (int i = 0; i < len; i++) {
wchar_t w = title[i];
buf[i] = w > 0x20 ? w : 0x20;
diff --git a/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp b/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp
index 2fdf6a5..f910d4a 100644
--- a/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp
+++ b/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp
@@ -24,6 +24,8 @@
#include <vector>
+#include "core/fxcrt/fx_memory_wrappers.h"
+
namespace {
const uint16_t EC_LEVEL_0_COEFFICIENTS[2] = {27, 917};
@@ -138,7 +140,7 @@
if (k < 0)
return {};
- std::vector<wchar_t> ech(k);
+ std::vector<wchar_t, FxAllocAllocator<wchar_t>> ech(k);
size_t sld = dataCodewords.GetLength();
for (size_t i = 0; i < sld; i++) {
int32_t t1 = (dataCodewords[i] + ech[k - 1]) % 929;