[PATCH] Avoid a divide by zero crash.

Max Woodbury mtewoodbury at gmail.com
Sat Mar 1 04:27:50 CST 2014


On 03/01/2014 05:16 AM, Dmitry Timoshkov wrote:
> Max Woodbury <mtewoodbury at gmail.com> wrote:
>
>>>>>> While tmHeight is not _supposed_ to ever be zero, it is an external
>>>>>>
>>>>>> input and has been found to be zero in a few rare fonts.  Detecting
>>>>>>
>>>>>> and fixing THAT problem should be handled elsewhere.  This change just
>>>>>>
>>>>>> keeps the application from being blown away by a divide by zero
>>>>>>
>>>>>> exception.
>>>>>
>>>>> This change needs at least more details and preferrably a test case.
>>>>>
>>>> The test case was submitted about a year ago.
>>>>
>>>> What more details do you think are needed?
>>>>
>>>> tmHeight is an external input, so it can have any value including
>>>> zero.  As such, it should NOT be used as a divisor.  This change uses
>>>> it as a multiplier on the other side of the comparison so it should not
>>>> cause THAT particular problem.  A little additional algebra simplifies
>>>> the code.
>>>
>>> Sounds like a deja-vu.
>>>
>> 8-) and your question was answered!?!
>
> I'm afraid that nothing has changed since last time.
>
:-(

Last time you said you would fix the problem elsewhere.  You have NOT 
done that.  The problem persists for those with the unusual fonts 
installed.  It still needs a fix.  You can still make the other changes 
when you get around to it.  That is NOT a reason for rejecting this patch.



More information about the wine-devel mailing list