[PATCH libXaw] fix potential infinte loop in XawBoxQueryGeometry() (bug 11569)

Alan Coopersmith alan.coopersmith at oracle.com
Fri Dec 3 14:28:06 PST 2010


Matt Turner wrote:
> From: Glenn Burkhardt <gbburkhardt at verizon.net>
> 
> Originally sent to xorg@ back in July 2007.
> http://lists.x.org/archives/xorg/2007-July/025997.html
> 
> ---
> Please don't ignore it this time.

It's Xaw, it's hard not to.

> -		if (width > constraint->width)
> +		if (width > constraint->width >> 1) /* avoid short int overflow */

Parentheses please, for those without the C operator precedence rules memorized.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list