1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-21 06:53:01 +08:00

Merge pull request #1131 from pabigot/pr/20190702

lv_img_cache: fix buffer overrun
This commit is contained in:
embeddedt 2019-07-02 19:18:24 -04:00 committed by GitHub
commit 507c220d3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,7 +118,7 @@ lv_img_cache_entry_t * lv_img_cache_open(const void * src, const lv_style_t * st
LV_LOG_WARN("Image draw cannot open the image resource");
lv_img_decoder_close(&cached_src->dec_dsc);
memset(&cached_src->dec_dsc, 0, sizeof(lv_img_decoder_dsc_t));
memset(&cached_src, 0, sizeof(lv_img_cache_entry_t));
memset(cached_src, 0, sizeof(lv_img_cache_entry_t));
cached_src->life = INT32_MIN; /*Make the empty entry very "weak" to force its use */
return NULL;
}