Sam Edwards <cfswo...@gmail.com> wrote:

> It makes the most sense to get rid of this sanity check altogether, but 
> until then, this should be a more robust way of doing it.

> +         * TODO: This sounds like a workaround for a much deeper bug 
> involving
> +         * aveWidth's calculation. We should investigate if/why this is 
> needed.
> +         */

This comment is confusing and wrong. There is a test case for which this check
is required.

> +        if (font->aveWidth < 0 || font->aveWidth > 
> font->potm->otmTextMetrics.tmHeight * 100)

A check for an overflow is probably needed. Also a check for negative aveWidth
should be a separate patch at best, and needs a test case.

-- 
Dmitry.


Reply via email to