OSDN Git Service

egl: don't NULL deref the .get_capabilities function pointer
authorEmil Velikov <emil.velikov@collabora.com>
Mon, 7 Aug 2017 16:23:19 +0000 (17:23 +0100)
committerAndres Gomez <agomez@igalia.com>
Wed, 6 Sep 2017 15:05:10 +0000 (18:05 +0300)
commit47b22fdf7f3236b5699b19fb7514668416806c0c
treea4606ec66c8e1a96a8ff2571509eb65069ba3064
parent72a90be2c8c8274d14f5343b5c093a1f0132d469
egl: don't NULL deref the .get_capabilities function pointer

One could easily introduce version 3 of the DRI2fenceExtension,
extending the struct, while not implementing the above function.

Thus we'll end up with NULL pointer, and dereferencing it won't fare
too well.

Fixes: 0201f01dc4e ("egl: add EGL_ANDROID_native_fence_sync")
Cc: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit f0d053cb6dda908d554d84629bd98e05d383a8f6)
src/egl/drivers/dri2/egl_dri2.c