https://bugs.documentfoundation.org/show_bug.cgi?id=120703
--- Comment #10 from Mike Kaganski <mikekagan...@hotmail.com> ---
sal/rtl/math.cxx
FP (nExp < 0 doesn't necessary imply that -nExp > 0 - see the comment):
> if (nExp < 0)
> {
> // && -nExp > 0 necessary for std::numeric_limits<int>::min()
> // because -nExp = nExp
> if (-nExp <= n10Count && -nExp > 0)
> → ↑ V560 A part of conditional expression is always true: - nExp >
> 0.
FP (the pointer is never stored):
> template< typename T >
> void doubleToString(typename T::String ** pResult,
> sal_Int32 * pResultCapacity, ...)
> {
> ...
> sal_Int32 nCapacity = RTL_CONSTASCII_LENGTH("NaN");
> if (!pResultCapacity)
> {
> pResultCapacity = &nCapacity;
> → ↑ V506 Pointer to local variable 'nCapacity' is stored outside
> the scope of this variable.
> → Such a pointer will become invalid.
> T::createBuffer(pResult, pResultCapacity);
> nResultOffset = 0;
> }
>
> T::appendAscii(pResult, pResultCapacity, &nResultOffset,
> RTL_CONSTASCII_STRINGPARAM("NaN"));
>
> return;
> }
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs