Re: [PATCH 03/18] [RFC] mi: Avoid division by zero errors in miInitializeColormap()

2013-04-08 Thread Keith Packard
Geert Uytterhoeven ge...@linux-m68k.org writes: Question: Should we restrict depth 3 to grayscale visuals instead? For monochrome this is already needed, as miCreateDefColormap() only preallocates black and white pixels if depth 1. Yes, it doesn't make sense to offer static color and true

[PATCH 03/18] [RFC] mi: Avoid division by zero errors in miInitializeColormap()

2013-03-27 Thread Geert Uytterhoeven
If depth 3, one or more of {red,green,blue}Mask and lim[rgb] will be zero, causing division by zero errors. Add checks to avoid this. Question: Should we restrict depth 3 to grayscale visuals instead? For monochrome this is already needed, as miCreateDefColormap() only preallocates black and