Bug 152200 - An input box followed by a to-character anchor of a textbox results in corrupt DOCX
Summary: An input box followed by a to-character anchor of a textbox results in corrup...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:7.5.0 target:7.4.4
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-24 11:53 UTC by Mike Kaganski
Modified: 2022-11-30 10:34 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
An input field and a textbox (14.66 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-11-24 11:53 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2022-11-24 11:53:57 UTC
Created attachment 183753 [details]
An input field and a textbox

Open the attached document in Writer, save (as DOCX), close, and reopen.
It crashes on opening it after close. In debug builds, a failed assertion message appears.

First of all, the bad DOCX should not be generated; also, invalid input must not crash the program.
Comment 1 Commit Notification 2022-11-24 21:01:51 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9a7945f36ce95a48e0d525bc444e722b9ec5c452

tdf#152200: tolerate begin/end fldChar context mismatch

It will be available in 7.5.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 2 Commit Notification 2022-11-25 15:55:40 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#152200: Make sure to not write objects into field character runs

It will be available in 7.5.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 2022-11-28 11:34:58 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

tdf#152200: tolerate begin/end fldChar context mismatch

It will be available in 7.4.4.

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 2022-11-30 09:57:11 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

tdf#152200: Make sure to not write objects into field character runs

It will be available in 7.4.4.

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.