RFC: vout/macosx: fix heap-buffer-overflow by using vlc_gl_Create()
vlc_gl_HasExtension requires vlc_gl_t be created by vlc_gl_Create, otherwise:
==15037==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60c00040e0c8 at pc 0x0001003436ae bp 0x70000acc6af0 sp 0x70000acc6ae8
READ of size 8 at 0x60c00040e0c8 thread T20
#0 0x1003436ad in vlc_gl_HasExtension opengl.c:206
#1 0x10bdc1ee3 in vlc_gl_api_Init gl_api.c:180
#2 0x10bdaa077 in vout_display_opengl_New vout_helper.c:110
#3 0x10bd94882 in Open macosx.m:236
I don't know how to test the second patch, ./vlc-osx-static -vv --vout caopengllayer
doesn't work.
Edited by Zhao Zhili