Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi Markus,

On Tue, 2011-12-13 at 00:15 +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.

I would be interested to know how to reproduce this crash.  Do you have
a good way to reproduce this?

Any objections against this patch? I think that this fix should be
correct for all cases but it would be good if someone could have a
look at it.

Well, I'm not necessarily objecting, but I'm a bit puzzled.  I would've
thought that, if nExp < 0 is true, -nExp > 0 is automatically true.
Anyway, if you have a code snippet that can make this code to segfault,
that would help me understand this better.

Thanks,

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.