Merge pull request #310 from orbisai0security/fix-v002-display-buffer-uaf

fix: remove unsafe exec() in display_task.c
This commit is contained in:
rUv 2026-04-03 09:01:41 -04:00 committed by GitHub
commit 430243c32c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 2 deletions

View File

@ -118,8 +118,14 @@ esp_err_t display_task_start(void)
if (!buf1 || !buf2) {
ESP_LOGE(TAG, "Failed to allocate LVGL buffers (%u bytes, caps=0x%lx)",
(unsigned)buf_size, (unsigned long)alloc_caps);
if (buf1) free(buf1);
if (buf2) free(buf2);
if (buf1) {
free(buf1);
buf1 = NULL;
}
if (buf2) {
free(buf2);
buf2 = NULL;
}
return ESP_OK;
}
ESP_LOGI(TAG, "LVGL buffers: 2x %u bytes (%u lines, %s)",