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

This commit is contained in:
Paul Vogel
2025-02-12 02:27:43 -06:00
committed by GitHub
parent 49d6d7295a
commit 155ee2a045
+6
View File
@@ -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*/