libole2 Patch: fix 1876,7178

From: Robert Wilhelm <robert.wilhelm_at_gmx.net>
Date: Fri Sep 03 2004 - 23:46:59 CEST

I have looked again into the
"Some MS Word documents without password are treated as
password-protected" bug, this time with cocao created doc files.

This files seem to have a bogus SBAT, but we can ignore this as
all streams seem to be >=4k and therefore use normal BAT.

See attached patch for a possible workaround.

Now the details, if you really want to know them :)

See http://jakarta.apache.org/poi/poifs/fileformat.html
as a reference.

Letīs have a look at attachment 2194 from bug #7178:

There is SBAT_START at block 6f and SBAT_BLOCK_COUNT is 1

00000000: d0cf 11e0 a1b1 1ae1 0000 0000 0000 0000 ................
00000010: 0000 0000 0000 0000 3e00 0300 feff 0900 ........>.......
00000020: 0600 0000 0000 0000 0000 0000 0100 0000 ................
00000030: 6e00 0000 0000 0000 0010 0000 6f00 0000 n...........o...
00000040: 0100 0000 feff ffff 0000 0000 6d00 0000 ............m...

but at ( 0x6f + 1) * 0x200 there are just zeros.

0000e000: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000e010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000e020: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000e030: 0000 0000 0000 0000 0000 0000 0000 0000 ................

Received on Fri Sep 3 23:32:38 2004

This archive was generated by hypermail 2.1.8 : Fri Sep 03 2004 - 23:32:38 CEST