diff options
Diffstat (limited to 'core/fxcodec/gif/cfx_gifcontext.cpp')
-rw-r--r-- | core/fxcodec/gif/cfx_gifcontext.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/fxcodec/gif/cfx_gifcontext.cpp b/core/fxcodec/gif/cfx_gifcontext.cpp index ca2e7c3c88..fba7334c93 100644 --- a/core/fxcodec/gif/cfx_gifcontext.cpp +++ b/core/fxcodec/gif/cfx_gifcontext.cpp @@ -176,6 +176,9 @@ CFX_GifDecodeStatus CFX_GifContext::LoadFrame(int32_t frame_num) { uint8_t* img_data = nullptr; uint32_t skip_size_org = skip_size_; CFX_GifImage* gif_image = images_[static_cast<size_t>(frame_num)].get(); + if (gif_image->image_info.height == 0) + return CFX_GifDecodeStatus::Error; + uint32_t gif_img_row_bytes = gif_image->image_info.width; if (gif_img_row_bytes == 0) return CFX_GifDecodeStatus::Error; |