diff options
author | Nicolas Pena <npm@chromium.org> | 2017-05-11 15:43:47 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-11 20:01:33 +0000 |
commit | 0dc8571d1354b8c319510be625a446218449f532 (patch) | |
tree | fec012e29cd98f7565565cdc84d219709c7e1dd6 /core/fxcodec/lgif/cgifdecompressor.cpp | |
parent | 830897a1774fb50d04b656d7bf70be321e133cf9 (diff) | |
download | pdfium-0dc8571d1354b8c319510be625a446218449f532.tar.xz |
Do not use vector data() when it is empty
Before, all pointers were being initialized to 0. After raw pointers were
changed to vectors, data() was used in some cases, but now no longer returns
nullptr when it is supposed to. This CL fixes that.
Bug: chromium:721417
Change-Id: Ia31b75b18dc17d7eed48538145fe5d0d59668843
Reviewed-on: https://pdfium-review.googlesource.com/5353
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fxcodec/lgif/cgifdecompressor.cpp')
-rw-r--r-- | core/fxcodec/lgif/cgifdecompressor.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/core/fxcodec/lgif/cgifdecompressor.cpp b/core/fxcodec/lgif/cgifdecompressor.cpp index 073659fd1c..6e9352f0af 100644 --- a/core/fxcodec/lgif/cgifdecompressor.cpp +++ b/core/fxcodec/lgif/cgifdecompressor.cpp @@ -18,7 +18,22 @@ FXGIF_Context::FXGIF_Context() {} FXGIF_Context::~FXGIF_Context() {} CGifDecompressor::CGifDecompressor(FXGIF_Context* p, char* error_string) - : decode_status(GIF_D_STATUS_SIG), err_ptr(error_string), gif_context(p) {} + : global_pal_num(0), + img_row_offset(0), + img_row_avail_size(0), + avail_in(0), + decode_status(GIF_D_STATUS_SIG), + skip_size(0), + err_ptr(error_string), + gif_context(p), + next_in(nullptr), + width(0), + height(0), + bc_index(0), + pixel_aspect(0), + global_sort_flag(0), + global_color_resolution(0), + img_pass_num(0) {} CGifDecompressor::~CGifDecompressor() {} |