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

Potential crash in FixRenderCommandList #208

Closed
Chomenor opened this issue Feb 1, 2023 · 2 comments
Closed

Potential crash in FixRenderCommandList #208

Chomenor opened this issue Feb 1, 2023 · 2 comments

Comments

@Chomenor
Copy link
Contributor

Chomenor commented Feb 1, 2023

The function FixRenderCommandList is called before the command list has been terminated with RC_END_OF_LIST, causing commands to be read from uninitialized memory at the end of iteration.

Usually this has no effect because the command id doesn't match any valid command and the iteration is aborted. However in some cases, especially if the command id from uninitialized memory happens to land on 3 (RC_DRAW_SURFS), this could lead to a crash.

@ec-
Copy link
Owner

ec- commented Feb 3, 2023

@Chomenor,
thank you for report, fixed in d2d1dc4

@Chomenor
Copy link
Contributor Author

Chomenor commented Feb 4, 2023

Thanks! I notice this fix doesn't apply to the opengl2 renderer, but I assume that is intentional, so not a big deal.

@Chomenor Chomenor closed this as completed Feb 4, 2023
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

No branches or pull requests

2 participants