GNOME Bugzilla – Bug 350644
Crash while reading an empty meta.xml or styles.xml file
Last modified: 2006-09-24 18:21:29 UTC
Gnumeric CVS-HEAD, FC5. Steps to reproduce: - Save an empty workbook as a .ods file - Attempt to reopen the saved file Backtrace: Program received signal SIGSEGV, Segmentation fault.
+ Trace 70148
Thread NaN (LWP 9201)
Created attachment 70585 [details] [review] proposed patch Adds two gsf_input_size() checks.
Hmm, while these tests are probably useful, the real problem is probably that those files should not be empty!
I should clarify that the steps in comment 0 will only produce an empty meta.xml file. I added the styles.xml check for overall robustness because Gnumeric will crash if you have an empty styles.xml file - I'm just not sure how such a situation would arise.
Is this from a recent cvs? I cannot replicate this problem but seem to recall to have fixed these empty files a short while ago.
Yes, it's the latest CVS (i.e. it includes the "2006-08-09 Eduardo Lima" commit). I see the same behavior after running 'make clean' and 'make uninstall', for what it's worth.
Created attachment 70650 [details] sample ods file This is the file that's saved after following the steps in comment 0.
With current gnumeric CVS _and_ current libgsf CVS neither meta.xml nor styles.xml is empty. That's why I don't see the crash on empty files I saved. Your libgsf is likely not 100% up-to-date. In any case I will be committing your patch but we should also have libgsf fixed to avoid any such crash for other programs that might use libgsf.
Comment on attachment 70585 [details] [review] proposed patch This does not really fix the originally crash which happened in libgsf but avoids unnecessary work (and as a cosequence prevents teh crash from occuring).
I can not replicate that crash with libgsf HEAD. Those tests should not be necessary, and I'd rather remove them. The backtrace you list looks like it's a crash in gsf rather than gnumeric code. Can you replicate with current gsf ?
patch has been reverted.
(In reply to comment #9) > I can not replicate that crash with libgsf HEAD. > Those tests should not be necessary, and I'd rather remove them. > > The backtrace you list looks like it's a crash in gsf rather than gnumeric > code. > Can you replicate with current gsf ? > I can't reproduce with libgsf 1.14.1. When I filed this bug, I had whichever version was "current" in the FC5 repositories (from the backtrace, it looks like a .13 version: /usr/lib/libgsf-1.so.113).
Ok. I've double checked that 1.14.2 will not have a problem with 0 sized xml.