diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-05-02 11:21:11 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-05-24 23:27:49 +0200 |
commit | 43082239d440a9a33bb2650ea5487836486983b6 (patch) | |
tree | 1b3c8fd5ea0869c65376f3f6563b841ef5df0a4c /src/core/ozone/gl_surface_qt.h | |
parent | c4aec7f9beca7b15c7733dab9808816fc46962aa (diff) |
Fix read-after-free on EGL extensions
Cache the read extensions as an std::string, since the returned C string
may be not be permanent.
Change-Id: I856b2b784ab4027da25996b2bf741b30cda10e05
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
(cherry picked from commit fd2fc0d2a86f39d563720563555ca6319f8ab223)
Diffstat (limited to 'src/core/ozone/gl_surface_qt.h')
-rw-r--r-- | src/core/ozone/gl_surface_qt.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/ozone/gl_surface_qt.h b/src/core/ozone/gl_surface_qt.h index cbdc8876a..b3a53d6b3 100644 --- a/src/core/ozone/gl_surface_qt.h +++ b/src/core/ozone/gl_surface_qt.h @@ -37,11 +37,11 @@ ** ****************************************************************************/ - - #ifndef GL_SURFACE_QT_H_ #define GL_SURFACE_QT_H_ +#include <string> + #include "ui/gfx/geometry/size.h" #include "ui/gl/gl_surface.h" @@ -71,7 +71,7 @@ protected: public: static void* g_config; static void* g_display; - static const char* g_extensions; + static std::string g_extensions; private: DISALLOW_COPY_AND_ASSIGN(GLSurfaceQt); |