Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix set px cb crash #2882

Merged
merged 1 commit into from
Dec 7, 2021
Merged

Fix set px cb crash #2882

merged 1 commit into from
Dec 7, 2021

Conversation

XuNeo
Copy link
Collaborator

@XuNeo XuNeo commented Dec 6, 2021

disp->driver->set_px_cb write buffer overflow

The coords in below code means the dest_buf includes clip_area data, thus should not modify dest_buf in line423.

disp->driver->set_px_cb(disp->driver, (void *)dest_buf, dest_stride, clip_area->x1 + x, clip_area->y1 + y, src_buf[x],
                                        opa);

And buffer width should not overflow clip_w.

Include lv_gpu_sdl.mk optionally, to avoid compiling error.

Checkpoints

  • Follow the styling guide
  • Run code-format.py from the scripts folder. astyle needs to be installed.
  • Update the documentation

src/gpu/lv_gpu.mk Outdated Show resolved Hide resolved
@kisvegabor kisvegabor merged commit e509506 into lvgl:master Dec 7, 2021
@kisvegabor
Copy link
Member

Thanks!

@XuNeo XuNeo deleted the fix-set-px-cb-crash branch June 27, 2023 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants