[Mesa-dev] [PATCH mesa 1/5] egl: move assert *before* the buffer overflow
Eric Engestrom
eric at engestrom.ch
Wed Mar 1 23:31:50 UTC 2017
Signed-off-by: Eric Engestrom <eric at engestrom.ch>
---
src/egl/main/eglapi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 5694b5a4ca..d964b4d289 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -470,8 +470,8 @@ _eglCreateExtensionsString(_EGLDisplay *dpy)
#define _EGL_CHECK_EXTENSION(ext) \
do { \
if (dpy->Extensions.ext) { \
- _eglAppendExtension(&exts, "EGL_" #ext); \
assert(exts <= dpy->ExtensionsString + _EGL_MAX_EXTENSIONS_LEN); \
+ _eglAppendExtension(&exts, "EGL_" #ext); \
} \
} while (0)
--
Cheers,
Eric
More information about the mesa-dev
mailing list