Bug 166939 - Saving back a particular document (with a single-character autostyle name) crashes
Summary: Saving back a particular document (with a single-character autostyle name) cr...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:26.2.0 target:25.8.0.0.beta2 t...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-10 12:34 UTC by Mike Kaganski
Modified: 2025-06-11 20:30 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Autostyle name just "a" (9.13 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-06-10 12:34 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2025-06-10 12:34:27 UTC
Created attachment 201178 [details]
Autostyle name just "a"

Open the attached document. Save it.
=> Crash

Important bits for reproduction:
1. Save format must be ODS.
2. Save directory must be the same as the source. Hence, simple "Save", as opposed to "Save As", is easier to reproduce.

The problem is out-of-bounds index when reading a string. It is interesting to notice, that the problem is reproducible e.g. using Windows official release build 25.2.0.3 and 25.2.3.2, but not 25.2.4.3; however, the bug is not fixed in the latter - it just happened to be masked by a particular code layout. A debug build of current master fails an assertion on this.
Comment 1 Mike Kaganski 2025-06-10 12:58:31 UTC
https://gerrit.libreoffice.org/c/core/+/186328
Comment 2 Commit Notification 2025-06-11 03:57:38 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/faab5ca6174e3e581661784216410e2bc88da081

tdf#166939: Don't pass invalid starting index when creating a view

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2025-06-11 05:17:48 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/36c41573ec7e47bd8c2b0f78210319c96088f164

tdf#166939: Don't pass invalid starting index when creating a view

It will be available in 25.8.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2025-06-11 06:57:04 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/1533b7de758d28ec08f4859f921b2edf894e87e4

tdf#166939: Don't pass invalid starting index when creating a view

It will be available in 25.2.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2025-06-11 14:34:16 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1ba380bc625f6a846b80bfdf2e2678788df49447

tdf#166939: Fix error in commit 36c41573ec7e47bd8c2b0f78210319c96088f164

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2025-06-11 15:17:35 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/0500bee1ad75dd50c1ee5fabb282dc54a864a61d

tdf#166939: Fix error in commit 36c41573ec7e47bd8c2b0f78210319c96088f164

It will be available in 25.8.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2025-06-11 20:30:13 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/adeb79b7bd4f492b46a97f8680a9b175fac79433

tdf#166939: Fix error in commit 36c41573ec7e47bd8c2b0f78210319c96088f164

It will be available in 25.2.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.