[Bug 102552] Null dereference due to not checking return value of util_format_description

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Sep 6 19:56:41 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=102552

--- Comment #3 from Pauk Denis <pauk.denis at gmail.com> ---
I have found this behaiviour because of error in my code when some time
is_format_supported called with uninitialized value and had value >
PIPE_FORMAT_COUNT. 

With check like:
-----
for(int i=0; i<PIPE_FORMAT_COUNT; i++) {
   pscreen->is_format_supported(pscreen, i, PIPE_TEXTURE_2D, 0,
PIPE_BIND_SAMPLER_VIEW);
   }
-----

Such code has possible issues with: 73, 78, 79, 80, 81, 86 (holes in enum
pipe_format).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170906/78ef9b92/attachment.html>


More information about the dri-devel mailing list