summaryrefslogtreecommitdiffstats
path: root/src/core/ozone/gl_surface_qt.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-05-02 11:21:11 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-05-24 23:27:49 +0200
commit43082239d440a9a33bb2650ea5487836486983b6 (patch)
tree1b3c8fd5ea0869c65376f3f6563b841ef5df0a4c /src/core/ozone/gl_surface_qt.h
parentc4aec7f9beca7b15c7733dab9808816fc46962aa (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.h6
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);