vendorgraphicbuffer: apply validation check before conversion

Before buffer_handle_t can be converted to private_handle_t safely,
we should validate it to avoid wrong operations on the native handle.

Bug: 253425086
Test: Boot to home
Merged-In: I078354717cf7a5a772c8b6d7cbbbbfd457eec600
Change-Id: I078354717cf7a5a772c8b6d7cbbbbfd457eec600
(cherry picked from commit 982c0990e38963d98b58aac2a5979a2841823b7b)
1 file changed