Bug 155887

Summary: [WMF] Inserted picture ended with EOF with size !=3 not displayed
Product: LibreOffice Reporter: Bartosz <gang65>
Component: DrawAssignee: Bartosz <gang65>
Status: CLOSED FIXED    
Severity: normal CC: gang65
Priority: medium    
Version: 3.3.0 release   
Hardware: All   
OS: All   
Whiteboard: target:24.2.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 103859    
Attachments: WMF Picture which is not displayed
How file should looks like

Description Bartosz 2023-06-17 00:35:18 UTC
Created attachment 187952 [details]
WMF Picture which is not displayed

Inserted picture ended with EOF with size !=3 not displayed.

This is a clone of the OO ticket:
https://bz.apache.org/ooo/show_bug.cgi?id=42090
Comment 1 Bartosz 2023-06-17 00:39:41 UTC
Created attachment 187953 [details]
How file should looks like
Comment 2 Bartosz 2023-10-25 06:52:58 UTC
In MS Office if the invalid record is found, the content is displayed up to the wrong record.

Currently:
If wrong WMF record is found the image is not displayed at all.

Expected:
If wrong WMF record is found, the image is displayed up to the wrong WMF record.
Comment 3 Commit Notification 2023-10-28 09:07:25 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/00e02dd832988ec3e7f37569c932ed66e1eb6efd

tdf#155887 Add individual WMF records validation

It will be available in 24.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 4 Commit Notification 2023-10-29 10:19:24 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

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

tdf#155887 WMF Fix displaying images with size of EOF other that 3

It will be available in 24.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.