Use PartitonAlloc to buffer some vectors in gif.

Change-Id: I404f79125c1be6fbc2f09f1b199ca8c85de75be0
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/62711
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxcodec/gif/cfx_gif.h b/core/fxcodec/gif/cfx_gif.h
index 9ca7211..c0c9d00 100644
--- a/core/fxcodec/gif/cfx_gif.h
+++ b/core/fxcodec/gif/cfx_gif.h
@@ -10,6 +10,8 @@
 #include <memory>
 #include <vector>
 
+#include "core/fxcrt/fx_memory_wrappers.h"
+
 class CFX_GifContext;
 
 extern const char kGifSignature87[];
@@ -122,7 +124,7 @@
 
   std::unique_ptr<CFX_GifGraphicControlExtension> image_GCE;
   std::vector<CFX_GifPalette> local_palettes;
-  std::vector<uint8_t> row_buffer;
+  std::vector<uint8_t, FxAllocAllocator<uint8_t>> row_buffer;
   CFX_CFX_GifImageInfo image_info;
   uint8_t local_pallette_exp;
   uint8_t code_exp;
diff --git a/core/fxcodec/gif/cfx_gifcontext.cpp b/core/fxcodec/gif/cfx_gifcontext.cpp
index 65c0682..267098a 100644
--- a/core/fxcodec/gif/cfx_gifcontext.cpp
+++ b/core/fxcodec/gif/cfx_gifcontext.cpp
@@ -223,7 +223,7 @@
   }
 
   uint8_t img_data_size;
-  std::vector<uint8_t> img_data;
+  std::vector<uint8_t, FxAllocAllocator<uint8_t>> img_data;
   size_t read_marker = input_buffer_->GetPosition();
 
   if (decode_status_ == GIF_D_STATUS_IMG_DATA) {