Commit f989a2f
committed
va: validate inputs in vaSetDriverName() before use
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>1 parent c57dc62 commit f989a2f
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
| 630 | + | |
630 | 631 | | |
631 | 632 | | |
632 | | - | |
| 633 | + | |
633 | 634 | | |
634 | 635 | | |
635 | 636 | | |
| |||
0 commit comments