[Libreoffice-bugs] [Bug 118442] New: BASIC: Converting a negative number string with decimals to double asserts in debug builds

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Jun 29 02:21:57 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=118442

            Bug ID: 118442
           Summary: BASIC: Converting a negative number string with
                    decimals to double asserts in debug builds
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: mikekaganski at hotmail.com

Running the BASIC code

> Sub Test
>   Dim f As Double
>   f = " -12.20"
> End Sub

brings assert in debug builds:

> ---------------------------
> Microsoft Visual C++ Runtime Library
> ---------------------------
> Assertion failed!
> 
> Program: C:\lo\core\instdir\program\sblo.dll
> File: C:\lo\core\include\rtl/ustrbuf.hxx
> Line: 490
> 
> Expression: index >= 0 && index < pData->length

The problem is that the number string is prepended with spaces and/or minus
sign, which is not accounted for in ImpScan in basic/source/sbx/sbxscan.cxx.

https://gerrit.libreoffice.org/56611 fixes this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180629/befd299e/attachment.html>


More information about the Libreoffice-bugs mailing list