RetroArch/gfx
Javier Martinez Canillas 42e8890c91
(GL) Fix NULL pointer dereference in gl2_init()
Commit 10df615d14 ("add "Send Debug Info" option under Help") added some
debug information that contains the GL_VENDOR, GL_RENDERER and GL_VERSION
strings that are returned by the glGetString() function, and is used by
algorithms to recognize the platform.

But in some GL contexts, these may be NULL which leads to a NULL pointer
dereference when trying to copy the returned strings. Commit 97247dbaec
("gl1: check for vender/renderer was in the wrong place") later fixed it
for the GL1 driver, but it missed doing the same for the GL driver.

For example, on an Exynos Odroid XU4 with a mali-fdev GL context I get:

$ retroarch -v
[INFO] RetroArch 1.8.5 (Git 8d3f25f)
[INFO] === Build =======================================
[INFO] Capabilities:  NEON VFPv3 VFPv4
[INFO] Built: Mar 18 2020
[INFO] Version: 1.8.5
[INFO] Git: 8d3f25f
[INFO] =================================================
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 30000.00 Hz.
[INFO] [Video]: Video @ 960x720
[INFO] [EGL] Falling back to eglGetDisplay
[INFO] [EGL]: EGL version: 1.4
[INFO] [GL]: Found GL context: mali-fbdev
[INFO] [GL]: Detecting screen resolution 0x0.
[INFO] [EGL]: Current context: 0xf08e20.
[INFO] [GL]: Vendor: (null), Renderer: (null).
[INFO] [GL]: Version: (null).
Segmentation fault (core dumped)
2020-03-18 23:44:50 +01:00
..
common Rename menu widgets to display widgets 2020-03-13 03:58:33 +01:00
display_servers - Merge runahead/mylist.c into retroarch.c 2020-02-13 17:26:11 +01:00
drivers (GL) Fix NULL pointer dereference in gl2_init() 2020-03-18 23:44:50 +01:00
drivers_context (GDI/Win32) Refactor code - handle doubleclick press on title bar 2020-03-13 02:20:31 +01:00
drivers_display (Metal) Buildfix 2020-03-09 01:18:01 +01:00
drivers_font (Vita) Buildfix 2020-03-12 20:54:38 +01:00
drivers_font_renderer Get rid of some configuration.h dependencies 2020-02-12 16:09:30 +01:00
drivers_renderchain (D3D9 renderchain) Take out video_frame_info dependencies 2020-03-08 19:03:57 +01:00
drivers_shader Fix MSVC include paths 2020-03-06 03:01:47 +01:00
include Add more headers 2019-12-07 07:17:21 +01:00
video_filters Don't use uname -a. 2020-01-15 06:27:42 -08:00
video_layout (Video layout) move init_string and set_string to stdstring - 2020-03-05 11:19:44 +01:00
widgets gfx_widgets: move libretro message widget into its own file 2020-03-17 17:16:21 +01:00
font_driver.c Get rid of video_frame_info dep for fonts 2020-03-10 03:24:59 +01:00
font_driver.h Get rid of video_frame_info dep for fonts 2020-03-10 03:24:59 +01:00
gfx_animation.c Cleanup 2020-03-06 15:40:45 +01:00
gfx_animation.h Fix smooth (vertical) line ticker scroll speed 2020-03-03 14:33:26 +00:00
gfx_display.c Use single 'Widgets Scale Override' setting on console and mobile platforms 2020-03-12 11:29:53 +00:00
gfx_display.h cleanups 2020-03-09 01:32:05 +01:00
gfx_thumbnail_path.c Header cleanups 2020-03-05 14:06:04 +01:00
gfx_thumbnail_path.h menu_thumbnail and menu_thumbnail_path now decoupled from menu 2020-02-16 16:38:17 +01:00
gfx_thumbnail.c No more video_info_frame dependency in gfx_thumbnail.c 2020-03-09 02:15:44 +01:00
gfx_thumbnail.h No more video_info_frame dependency in gfx_thumbnail.c 2020-03-09 02:15:44 +01:00
gfx_widgets.c gfx_widgets: move libretro message widget into its own file 2020-03-17 17:16:21 +01:00
gfx_widgets.h gfx_widgets: move libretro message widget into its own file 2020-03-17 17:16:21 +01:00
video_coord_array.c Clean up trailing whitespace 2017-12-12 00:24:18 -08:00
video_coord_array.h Clean up trailing whitespace 2017-12-12 00:24:18 -08:00
video_crt_switch.c Move display_server code into retroarch.c 2020-03-08 18:48:15 +01:00
video_crt_switch.h Fix build warnings and cleanup 2019-02-12 10:26:17 +00:00
video_defines.h Get rid of unimplemented FPGA font driver 2020-03-09 22:13:17 +01:00
video_display_server.h (display server) Cleanup 2020-02-16 17:34:26 +01:00
video_filter.c Only use threads when the number > 1 2020-01-04 16:36:54 +01:00
video_filter.h Fix some linkage errors with RA MSVC 2010 2017-12-30 13:00:08 +01:00
video_layout.c (Video layout) Get rid of video_frame_info dependency 2020-03-10 19:10:02 +01:00
video_layout.h (Video layout) Get rid of video_frame_info dependency 2020-03-10 19:10:02 +01:00
video_shader_parse.c Buildfix 2020-02-17 12:27:08 +01:00
video_shader_parse.h Get rid of menu_shader_set_modified - instead, add a single 2020-03-06 17:05:20 +01:00
video_thread_wrapper.c Merge pull request #10256 from jdgleaver/threaded-video-show-mouse 2020-03-12 16:09:09 +01:00
video_thread_wrapper.h Update set keyboard mapping code for input driver 2019-07-27 02:21:24 +02:00