Bug 73608 - docx import: loop&crash if the style: basedOn attribute can't be found or points to itself
Summary: docx import: loop&crash if the style: basedOn attribute can't be found or poi...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.2.0.2 rc
Hardware: Other All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:4.4.0 target:4.2.7 target:4.3.3
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-14 14:41 UTC by Sven-Jacobi
Modified: 2014-10-01 07:39 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
used table style can't be found (10.81 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-01-14 14:49 UTC, Sven-Jacobi
Details
used table style points to itself (10.80 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-01-14 14:50 UTC, Sven-Jacobi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven-Jacobi 2014-01-14 14:41:41 UTC
The method lcl_SearchParentStyleSheetAndMergeProperties in writerfilter/source/dmapper/DomainMapperTableHandler.cxx crashes if loading one of the attached documents. 

An endless loop has to be prevented.
Comment 1 Sven-Jacobi 2014-01-14 14:49:24 UTC
Created attachment 92045 [details]
used table style can't be found
Comment 2 Sven-Jacobi 2014-01-14 14:50:02 UTC
Created attachment 92046 [details]
used table style points to itself
Comment 3 bfoman (inactive) 2014-01-17 18:46:26 UTC
Checked with:
Version: 4.2.0.2
Build ID: cd65d6220c5694ee7012d7863bcde3455c9e3c30
Windows 8.1 Enterprise 64 bit

Could not reproduce. Documents open fine. No crash.
Comment 4 Jorendc 2014-01-18 10:50:30 UTC
Confirmed, tested using Mac OSX 10.9 with LibreOffice Version: 4.3.0.0.alpha0+
Build ID: 99159a618fd1ea90a2bc8a72621c88a4cf26e6f5 TinderBox: MacOSX-x86@49-TDF, Branch:master, Time: 2014-01-17_06:36:23

Both attached documents crashes immediately.

Kind regards,
Joren
Comment 5 Commit Notification 2014-09-28 17:36:28 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Related: fdo#73608 don't crash on missing table styles



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 6 Commit Notification 2014-09-28 17:36:45 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: fdo#73608 bail out on loop in style sheet hierarchy



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 7 Commit Notification 2014-09-30 20:27:21 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=efd7c456fffc77a6bb2e85d3d89f98ccd4a0faba&h=libreoffice-4-2

Related: fdo#73608 don't crash on missing table styles


It will be available in LibreOffice 4.2.7.

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 8 Commit Notification 2014-10-01 07:39:22 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=dea3d98936aad30a7d6804c76e502c9fc9603985&h=libreoffice-4-3

Related: fdo#73608 don't crash on missing table styles


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