diff options
Diffstat (limited to 'core/fxcodec/lbmp/fx_bmp.cpp')
-rw-r--r-- | core/fxcodec/lbmp/fx_bmp.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/fxcodec/lbmp/fx_bmp.cpp b/core/fxcodec/lbmp/fx_bmp.cpp index 2b072a4a0c..13525b807d 100644 --- a/core/fxcodec/lbmp/fx_bmp.cpp +++ b/core/fxcodec/lbmp/fx_bmp.cpp @@ -171,7 +171,8 @@ int32_t bmp_read_header(bmp_decompress_struct_p bmp_ptr) { return 0; } } - if (bmp_ptr->width <= 0 || bmp_ptr->compress_flag > BMP_BITFIELDS) { + if (bmp_ptr->width <= 0 || bmp_ptr->width > BMP_MAX_WIDTH || + bmp_ptr->compress_flag > BMP_BITFIELDS) { bmp_error(bmp_ptr, "The Bmp File Is Corrupt"); return 0; } |