After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 656531 - Fix for gsf_vba_inflate
Fix for gsf_vba_inflate
Status: RESOLVED FIXED
Product: libgsf
Classification: Core
Component: MS OLE2 & Properties
1.14.x
Other Linux
: Normal enhancement
: ---
Assigned To: Stepan Kasal
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2011-08-14 19:52 UTC by Valek Filippov
Modified: 2013-01-23 18:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for gsf_vba_inflate (4.71 KB, patch)
2011-08-14 19:53 UTC, Valek Filippov
none Details | Review
Do not call "gsf_input_size" every time, and workaround for MS Office compression bug (4.78 KB, patch)
2011-08-14 22:53 UTC, Valek Filippov
none Details | Review
Fix off by 1; seek to offset (4.78 KB, patch)
2011-08-21 04:29 UTC, Valek Filippov
none Details | Review
xls file with large (>4k) VBA module (38.00 KB, application/msexcel)
2011-09-18 14:43 UTC, Valek Filippov
  Details

Description Valek Filippov 2011-08-14 19:52:25 UTC
"gsf_vba_inflate" does not match with decompression algorithm from [MS-OVBA].
(XL saves something not 100% different from what documented in [MS-OVBA]).
Attached patch is a proposed fix based on [MS-OVBA] and corrected to XL's reality.
Comment 1 Valek Filippov 2011-08-14 19:53:11 UTC
Created attachment 193828 [details] [review]
Patch for gsf_vba_inflate
Comment 2 Valek Filippov 2011-08-14 22:53:58 UTC
Created attachment 193831 [details] [review]
Do not call "gsf_input_size" every time, and workaround for MS Office compression bug
Comment 3 Valek Filippov 2011-08-21 04:29:39 UTC
Created attachment 194320 [details] [review]
Fix off by 1; seek to offset
Comment 4 Valek Filippov 2011-09-18 14:43:25 UTC
Created attachment 196882 [details]
xls file with large (>4k) VBA module

MSO 2k7 (and probably others) uses inflate/deflate algorithms which do not match with description from MS-OVBA.
In case resulting deflated module is bigger than 4k some MSO applications fail to inflate whatever they deflated and some other are able to inflate their own compressed (not like described in the documentation) data.
Comment 5 Morten Welinder 2011-12-07 19:44:50 UTC
Go ahead with this, but fix "@gboolean" first.
Comment 6 Valek Filippov 2013-01-05 06:16:19 UTC
Fixed, pushed.
Comment 7 Morten Welinder 2013-01-17 18:57:56 UTC
I now get errors on loading samples/excel/mathfuns.xls in gnumeric:

** (/home/welinder/gnome-src/gnumeric/src/.libs/gnumeric:25342): WARNING **: Problems extracting the source for Sheet1 @ 853

** (/home/welinder/gnome-src/gnumeric/src/.libs/gnumeric:25342): WARNING **: Problems extracting the source for ThisWorkbook @ 805


Please advise.
Comment 8 Valek Filippov 2013-01-19 21:30:22 UTC
(In reply to comment #7)
> I now get errors on loading samples/excel/mathfuns.xls in gnumeric:
> Please advise.

Fix has been pushed to git.
Comment 9 Morten Welinder 2013-01-23 18:19:08 UTC
Seems better.