[PATCH] libxt src/Resource.c Fix-possible-NULL-access - Comment fix
Alan Coopersmith
alan.coopersmith at oracle.com
Wed Nov 10 22:05:23 PST 2010
walter harms wrote:
> Fix possibl NULL access
>
> Signed-off-by: walter harms <wharms at bfs.de>
>
> diff --git a/src/Resources.c b/src/Resources.c
> index 1cb37d4..3090d7e 100644
> --- a/src/Resources.c
> +++ b/src/Resources.c
> @@ -967,8 +967,11 @@ static XtCacheRef *GetResources(
> if (cache_ptr && *cache_ptr)
> cache_ptr++;
> } else {
> + /* value.addr can be NULL see: !already_copied */
> + if (value.addr)
> *((XtTranslations *)&widget->core.tm.current_state) =
> *((XtTranslations *)value.addr);
> +
Pushed to git after fixing indenting to match the surrounding code and
deleting the line with a bunch of empty spaces in.
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
More information about the xorg-devel
mailing list