[Mesa-dev] [PATCH 2/5] glx: add extra null check in getFBConfigs

Ian Romanick idr at freedesktop.org
Mon Feb 17 12:30:02 PST 2014


I think if __glXQueryServerString returns NULL, getFBConfigs should
return failure.  It also looks like __glXQueryServerString could use
some NULL checks.

On 02/14/2014 05:23 AM, Juha-Pekka Heikkila wrote:
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> ---
>  src/glx/glxext.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/glx/glxext.c b/src/glx/glxext.c
> index 4a195bd..837c5b0 100644
> --- a/src/glx/glxext.c
> +++ b/src/glx/glxext.c
> @@ -686,7 +686,8 @@ static GLboolean
>        fb_req->glxCode = X_GLXGetFBConfigs;
>        fb_req->screen = screen;
>     }
> -   else if (strstr(psc->serverGLXexts, "GLX_SGIX_fbconfig") != NULL) {
> +   else if (psc->serverGLXexts != NULL &&
> +            strstr(psc->serverGLXexts, "GLX_SGIX_fbconfig") != NULL) {
>        GetReqExtra(GLXVendorPrivateWithReply,
>                    sz_xGLXGetFBConfigsSGIXReq -
>                    sz_xGLXVendorPrivateWithReplyReq, vpreq);
> 



More information about the mesa-dev mailing list