Skip to content

enhance some security check #880

Merged
XinfengZhang merged 2 commits intointel:masterfrom
XinfengZhang:se1
Apr 23, 2026
Merged

enhance some security check #880
XinfengZhang merged 2 commits intointel:masterfrom
XinfengZhang:se1

Conversation

@XinfengZhang
Copy link
Copy Markdown
Contributor

No description provided.

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>
@XinfengZhang XinfengZhang merged commit f989a2f into intel:master Apr 23, 2026
14 checks passed
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