Commit abe86edd authored by Laurent Aimar's avatar Laurent Aimar
Browse files

Fixed a potential infinite loop in CheckAPI() (egl).

parent e87072e0
...@@ -80,6 +80,8 @@ static bool CheckAPI (EGLDisplay dpy, const char *api) ...@@ -80,6 +80,8 @@ static bool CheckAPI (EGLDisplay dpy, const char *api)
/* Cannot use strtok_r() on constant string... */ /* Cannot use strtok_r() on constant string... */
do do
{ {
while (*apis == ' ')
apis++;
if (!strncmp (apis, api, apilen) if (!strncmp (apis, api, apilen)
&& (memchr (" ", apis[apilen], 2) != NULL)) && (memchr (" ", apis[apilen], 2) != NULL))
return true; return true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment