Bug 94617 - method nStart overflow in pCode
Summary: method nStart overflow in pCode
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.0.2.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.0.3 target:5.1.0
Keywords:
: 89710 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-09-29 14:25 UTC by Laurent Godard
Modified: 2021-05-21 08:29 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Godard 2015-09-29 14:25:53 UTC
In a big module with a lot of lines, if a method is declared near the end, then calling it leads to crash

the problem is that nStart offset is sal_uInt32 and it stored as Int16 in SbMethod::StoreData()

Then the nStart offset is wrong in SbMethod::LoadData() 
if nStart > std::numeric_limits<sal_Int16>::max()
Comment 1 Commit Notification 2015-10-01 14:32:17 UTC
Laurent Godard committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=db17079fcff6f9a068c499b17f2501cc4c82d10b&h=libreoffice-5-0

tdf#94617 allow to store nStart information greater than sal_Int16 limit

It will be available in 5.0.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 2 Commit Notification 2015-10-01 15:36:54 UTC
Laurent Godard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ddb45261590939d884ac2bcb1fd258de7b2370da

tdf#94617 allow to store nStart information greater than sal_Int16 limit

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 3 Cor Nouws 2015-10-01 20:37:36 UTC
(In reply to Commit Notification from comment #2)
> Laurent Godard committed a patch related to this issue.
> It has been pushed to "master":


Nice improvement again. Thanks a lot!
Comment 4 Gerhard Schaber 2016-03-07 12:56:53 UTC
*** Bug 89710 has been marked as a duplicate of this bug. ***