33388925 Mismatched new vs delete in framesequence library

* The array allocations neglected to include [] so delete, instead
of delete [] would get called.

* Test
Manual
- tested sending a large gif that would invoke the GifTranscoder library
to make the gif smaller.

Bug: 33388925
Change-Id: I1e200e470d66ae615ffe9340ff9c049eaa73f63c
This commit is contained in:
Tom Taylor
2017-01-04 09:42:37 -08:00
parent 3f6e2e2b07
commit 837474a376

View File

@@ -144,10 +144,10 @@ bool GifTranscoder::resizeBoxFilter(GifFileType* gifIn, GifFileType* gifOut) {
std::vector<GifByteType> srcBuffer(gifIn->SWidth * gifIn->SHeight);
// Buffer for rendering images from the input GIF.
std::unique_ptr<ColorARGB> renderBuffer(new ColorARGB[gifIn->SWidth * gifIn->SHeight]);
std::unique_ptr<ColorARGB[]> renderBuffer(new ColorARGB[gifIn->SWidth * gifIn->SHeight]);
// Buffer for writing new images to output GIF (one row at a time).
std::unique_ptr<GifByteType> dstRowBuffer(new GifByteType[gifOut->SWidth]);
std::unique_ptr<GifByteType[]> dstRowBuffer(new GifByteType[gifOut->SWidth]);
// Many GIFs use DISPOSE_DO_NOT to make images draw on top of previous images. They can also
// use DISPOSE_BACKGROUND to clear the last image region before drawing the next one. We need