mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-20 21:35:19 +08:00
fix(bin_decoder): check divisor is zero (#7610)
Arduino Lint / lint (push) Waiting to run
MicroPython CI / Build esp32 port (push) Waiting to run
MicroPython CI / Build rp2 port (push) Waiting to run
MicroPython CI / Build stm32 port (push) Waiting to run
MicroPython CI / Build unix port (push) Waiting to run
C/C++ CI / Build OPTIONS_16BIT (push) Waiting to run
C/C++ CI / Build OPTIONS_24BIT (push) Waiting to run
C/C++ CI / Build OPTIONS_FULL_32BIT (push) Waiting to run
C/C++ CI / Build OPTIONS_SDL (push) Waiting to run
C/C++ CI / Build OPTIONS_VG_LITE (push) Waiting to run
C/C++ CI / Build Windows GCC (push) Waiting to run
C/C++ CI / Build Windows MSVC (push) Waiting to run
C/C++ CI / Build ESP IDF ESP32S3 (push) Waiting to run
C/C++ CI / Run tests with 32bit build (push) Waiting to run
C/C++ CI / Run tests with 64bit build (push) Waiting to run
BOM Check / bom-check (push) Waiting to run
Verify that lv_conf_internal.h matches repository state / verify-conf-internal (push) Waiting to run
Verify the widget property name / verify-property-name (push) Waiting to run
Verify code formatting / verify-formatting (push) Waiting to run
Build docs / build-and-deploy (push) Waiting to run
Test API JSON generator / Test API JSON (push) Waiting to run
Check Makefile / Build using Makefile (push) Waiting to run
Check Makefile for UEFI / Build using Makefile for UEFI (push) Waiting to run
Port repo release update / run-release-branch-updater (push) Waiting to run
Verify Kconfig / verify-kconfig (push) Waiting to run
Arduino Lint / lint (push) Waiting to run
MicroPython CI / Build esp32 port (push) Waiting to run
MicroPython CI / Build rp2 port (push) Waiting to run
MicroPython CI / Build stm32 port (push) Waiting to run
MicroPython CI / Build unix port (push) Waiting to run
C/C++ CI / Build OPTIONS_16BIT (push) Waiting to run
C/C++ CI / Build OPTIONS_24BIT (push) Waiting to run
C/C++ CI / Build OPTIONS_FULL_32BIT (push) Waiting to run
C/C++ CI / Build OPTIONS_SDL (push) Waiting to run
C/C++ CI / Build OPTIONS_VG_LITE (push) Waiting to run
C/C++ CI / Build Windows GCC (push) Waiting to run
C/C++ CI / Build Windows MSVC (push) Waiting to run
C/C++ CI / Build ESP IDF ESP32S3 (push) Waiting to run
C/C++ CI / Run tests with 32bit build (push) Waiting to run
C/C++ CI / Run tests with 64bit build (push) Waiting to run
BOM Check / bom-check (push) Waiting to run
Verify that lv_conf_internal.h matches repository state / verify-conf-internal (push) Waiting to run
Verify the widget property name / verify-property-name (push) Waiting to run
Verify code formatting / verify-formatting (push) Waiting to run
Build docs / build-and-deploy (push) Waiting to run
Test API JSON generator / Test API JSON (push) Waiting to run
Check Makefile / Build using Makefile (push) Waiting to run
Check Makefile for UEFI / Build using Makefile for UEFI (push) Waiting to run
Port repo release update / run-release-branch-updater (push) Waiting to run
Verify Kconfig / verify-kconfig (push) Waiting to run
This commit is contained in:
@@ -838,6 +838,12 @@ static lv_result_t decode_alpha_only(lv_image_decoder_t * decoder, lv_image_deco
|
||||
uint32_t rn;
|
||||
decoder_data_t * decoder_data = dsc->user_data;
|
||||
uint8_t bpp = lv_color_format_get_bpp(dsc->header.cf);
|
||||
|
||||
if(bpp == 0) {
|
||||
LV_LOG_ERROR("Error color format: %d", dsc->header.cf);
|
||||
return LV_RESULT_INVALID;
|
||||
}
|
||||
|
||||
uint32_t w = (dsc->header.stride * 8) / bpp;
|
||||
uint32_t buf_stride = (w * 8 + 7) >> 3; /*stride for img_data*/
|
||||
uint32_t buf_len = w * dsc->header.h; /*always decode to A8 format*/
|
||||
|
||||
Reference in New Issue
Block a user