basic/source/comp/scanner.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit caecf6102f5042908c915afe89834ab7d3a4a4cb Author: Eike Rathke <er...@redhat.com> Date: Thu Mar 21 19:30:36 2013 +0100 SbiScanner::NextSym: check status after rtl_math_uStringToDouble() For example, 10e308 is overflow, not 0 ... Change-Id: Ib7d622865bfb73581732bda45c76e078ee7d05d0 diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index 5fbdcef..728187c 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -361,8 +361,11 @@ bool SbiScanner::NextSym() { aError = OUString('.'); GenError( SbERR_BAD_CHAR_IN_NUMBER ); } - // #57844 use localized function - nVal = rtl_math_uStringToDouble( buf, buf+(p-buf), '.', ',', NULL, NULL ); + rtl_math_ConversionStatus eStatus = rtl_math_ConversionStatus_Ok; + const sal_Unicode* pParseEnd = buf; + nVal = rtl_math_uStringToDouble( buf, buf+(p-buf), '.', ',', &eStatus, &pParseEnd ); + if (eStatus != rtl_math_ConversionStatus_Ok || pParseEnd != buf+(p-buf)) + GenError( SbERR_MATH_OVERFLOW ); ndig = ndig - comma; if( !comma && !exp ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits