diff options
author | Chad Versace <[email protected]> | 2016-09-27 13:27:09 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2016-10-04 14:11:28 -0700 |
commit | 69adb9a778470b1717e619e38aebb47a28031756 (patch) | |
tree | 73baae7d41cde3de66ff1244bad2b8e26e8f774b /src/egl/main/eglsync.c | |
parent | 17084b6f9340f798111e53e08f5d35c7630cee48 (diff) |
egl: Fix truncation error in _eglParseSyncAttribList64
The function stores EGLAttrib values in EGLint variables. On 64-bit
systems, this truncated the values.
Cc: [email protected]
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl/main/eglsync.c')
-rw-r--r-- | src/egl/main/eglsync.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/egl/main/eglsync.c b/src/egl/main/eglsync.c index 33625e97ae3..f3250319dcc 100644 --- a/src/egl/main/eglsync.c +++ b/src/egl/main/eglsync.c @@ -26,6 +26,7 @@ **************************************************************************/ +#include <inttypes.h> #include <string.h> #include "eglsync.h" @@ -75,8 +76,8 @@ _eglParseSyncAttribList64(_EGLSync *sync, const EGLAttrib *attrib_list) return EGL_SUCCESS; for (i = 0; attrib_list[i] != EGL_NONE; i++) { - EGLint attr = attrib_list[i++]; - EGLint val = attrib_list[i]; + EGLAttrib attr = attrib_list[i++]; + EGLAttrib val = attrib_list[i]; switch (attr) { case EGL_CL_EVENT_HANDLE_KHR: @@ -92,7 +93,7 @@ _eglParseSyncAttribList64(_EGLSync *sync, const EGLAttrib *attrib_list) } if (err != EGL_SUCCESS) { - _eglLog(_EGL_DEBUG, "bad sync attribute 0x%04x", attr); + _eglLog(_EGL_DEBUG, "bad sync attribute 0x%" PRIxPTR, attr); break; } } |