[Libreoffice] [PATCH] fix for crash in math.cxx for std::numeric_limits<int>::min

Eike Rathke erack at redhat.com
Tue Dec 13 05:17:19 PST 2011

Hi Markus,

On Tuesday, 2011-12-13 00:15:08 +0100, Markus Mohrhard wrote:

> the attached patch fixes a crash in our rtl::math lib. For
> std::numeric_limits<int>::min() -nExp is the same as nExp and
> therefore we would be in the first case and try to access a non
> existing element.

Good catch. As Stephan said, please add a comment why the additional
check is in so it doesn't get "optimized out" if someone comes across
and reads the not so obvious code.


LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111213/ef2d1050/attachment.pgp>

More information about the LibreOffice mailing list