Skip to content

Conversation

@avolmat-st
Copy link

Following PR #98719, add proper display API function return value checks in all samples in order to fail if an error happen.

Moreover, within the LTDC driver, ensure that the rectangle given (x,y / width-height) properly fit into the framebuffer in order xto avoid OOB access.

Such check is currently done within the LTDC only, however I think that some of those checks should be done within the API functions themself to ensure a first level of proper parameter validity. In order to have proper behavior of all display drivers, some level of framework level checks can be done, removing amount of duplicated code between drivers.
I will prepare a PR for that purpose and propose it.

uLipe
uLipe previously approved these changes Nov 11, 2025
Alain Volmat added 2 commits November 11, 2025 21:15
Ensure that display api function return values are checked.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Ensure that x,y/width-height rectangle mentioned in display_read
and display_write are actually part of the framebuffer, otherwise
return an error.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
@sonarqubecloud
Copy link

@avolmat-st
Copy link
Author

@faxe1008 could you have a look at this again ?

@nashif nashif merged commit 38d89c2 into zephyrproject-rtos:main Nov 20, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Display area: Input Input Subsystem and Drivers area: LVGL Light and Versatile Graphics Library Support area: Samples Samples area: State Machine Framework State Machine Framework area: Video Video subsystem platform: STM32 ST Micro STM32

Projects

None yet

Development

Successfully merging this pull request may close these issues.