Skip to content

Revert "enhance some security check "#881

Open
XinfengZhang wants to merge 4 commits intomasterfrom
revert-880-se1
Open

Revert "enhance some security check "#881
XinfengZhang wants to merge 4 commits intomasterfrom
revert-880-se1

Conversation

@XinfengZhang
Copy link
Copy Markdown
Contributor

Reverts #880

Add a null-pointer check for the display parameter at the entry of vaGetDisplayWl(), returning NULL
immediately instead of proceeding to backend initialization which would crash with a null
dereference.

This aligns the Wayland constructor with the X11 and DRM constructors which already validate their
native display/fd arguments early.

Signed-off-by: Carl.Zhang <carl.zhang@intel.com>
Add CHECK_DISPLAY(dpy) before CTX(dpy) to validate the display handle,
and add a NULL check for driver_name before calling strlen(). Without
these guards, passing NULL for either argument causes a null-pointer
dereference instead of returning a proper error status.

This aligns vaSetDriverName() with the validation pattern used by
other public APIs in va.c.

Signed-off-by: Carl.Zhang <carl.zhang@intel.com>
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.

1 participant