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 PX_Initialize bug #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

dududuguo
Copy link

Fix #119

Fix SEGV crash when screen size is too small

When screen dimensions are less than 25x25, PX_Object_ScrollAreaCreate() returns PX_NULL, but PainterEngine_Initialize() did not properly handle this case and continued execution with an uninitialized memory pool pointer (mp). This led to a SEGV crash when the null pointer was later dereferenced.

by:

  1. Adding null pointer check for mp in PX_Object_FireworkKICreate()
  2. Initializing mp to NULL in PainterEngine_Initialize()
  3. Adding proper error handling when mp initialization fails:
    • Add error messages for failed memory pool initialization
    • Add message indicating minimum window size requirement (24x24)
    • Return PX_FALSE to prevent further execution with invalid mp

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.

[BUG] SEGV on unknown address
1 participant