Bug 71309 - FILESAVE: Export SWF of unamed file with Multiple files crashes
Summary: FILESAVE: Export SWF of unamed file with Multiple files crashes
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Laurent Balland
URL:
Whiteboard: BSA target:4.2.0 target:4.1.4
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-06 16:01 UTC by Laurent Balland
Modified: 2013-11-12 16:18 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
gdb session (4.93 KB, text/plain)
2013-11-09 15:07 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Balland 2013-11-06 16:01:40 UTC
Problem description: 

Steps to reproduce:
1. create a new empty presentation
2. File > Export, select Macromedia Flash SWF
3. check Export as Multiple Files, OK

Current behavior:
crash

Expected behavior:
no crash

The bug is due to
http://opengrok.libreoffice.org/xref/core/filter/source/flash/swffilter.cxx#297
if file has no name, then lastdot = -1, then it crashes on creation of sPresentationName.

              
Operating System: All
Version: 4.2.0.0.alpha0+ Master
Comment 1 Julien Nabet 2013-11-09 15:07:52 UTC
Created attachment 88932 [details]
gdb session

On pc Debian x86-64 with master sources updated today, I reproduced this.
I attached a gdb session
Comment 2 Julien Nabet 2013-11-09 15:12:16 UTC
Michael: any idea who may help here?
Comment 3 Laurent Balland 2013-11-10 18:18:40 UTC
I proposed a patch which is under review
https://gerrit.libreoffice.org/#/c/6598/

But it allows only to avoid crash. Unnamed files are not treated.
Comment 4 Commit Notification 2013-11-12 14:08:51 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: fdo#71309 Export SWF with Multiple files crashes



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 5 Michael Stahl (allotropia) 2013-11-12 15:00:42 UTC
the code in FlashExportFilter::ExportAsMultipleFiles is pretty nutso,
deliberately ignoring the filename the user entered in the Export dialog.

... and what exactly is the use-case for a "Multiple File" SWF export?

can this feature be removed?

/me should write a mail to ux-advise...
Comment 6 Michael Stahl (allotropia) 2013-11-12 16:09:24 UTC
sent a mail to ux-advise about removing this feature.

fixed by your commit anyway, thanks, pushed also to libreoffice-4-1 which is affected too...
Comment 7 Commit Notification 2013-11-12 16:18:48 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=484b1e6ea4e65f225f4694de006a22a69d734c76&h=libreoffice-4-1

Resolves: fdo#71309 Export SWF with Multiple files crashes


It will be available in LibreOffice 4.1.4.

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.