[PATCH] [glx] Fix use of uninitialized variable in __glXDRIscreenProbe()
Ian Romanick
idr at freedesktop.org
Tue Dec 22 11:47:03 PST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Tomas Carnecky wrote:
> This fixed a 'Result of operation is garbage or undefined' bug found
> by clang. 'framebuffer.base' was read before being initialized.
>
> Signed-off-by: Tomas Carnecky <tom at dbservice.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> glx/glxdri.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/glx/glxdri.c b/glx/glxdri.c
> index 6122653..f20e50c 100644
> --- a/glx/glxdri.c
> +++ b/glx/glxdri.c
> @@ -977,6 +977,8 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
> return NULL;
> }
>
> + framebuffer.base = NULL;
> +
> screen = xcalloc(1, sizeof *screen);
> if (screen == NULL)
> return NULL;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAksxIjQACgkQX1gOwKyEAw8VZACglmUkBBycEGiuSqNeCX7DQkvX
ZUUAn12ngyO5+Z2947KkBop3Lhpjp5ev
=bq5q
-----END PGP SIGNATURE-----
More information about the xorg-devel
mailing list