Files
odfstudio/tools/source
Caolán McNamara 4e639c37b4 ofz#29691 revert throw SvStreamEOFException
reasonably sane code like
s.ReadUInt32(a).ReadUInt32(b).ReadUInt32(c).ReadUInt32(d);
if (s.good())
    // use a, b, c d;
stopped working.

FWIW on a short read we retain whatever was in the variable before the
read, rather than overwrite it with new random data, so
sal_uInt32 a(0xdead); s.ReadUInt32(a); assert(s.good() || a == 0xdead);

the msoffice ppt/escher/xls/doc filters especially speculatively parse
and rely on a variables preinit value in the case of a short read.

commit b345a2bab0
    cid#1470786 Uncaught exception

commit 71aec4726a
    ofz#29528 uncaught exception

commit bed03603f6
    ofz#29414 uncaught exception

commit 684885a99a
    ofz#29443 uncaught exception

commit 93574ac776
    ofz#29251 Abrt

commit 413db68d95
    ofz#29152 short read

commit f400e88304
    ofz#29151 short read

commit 96ea80a725
    ofz#29129 Abrt on uncaught exception

commit 646a635efe
    ofz#28931 Indirect-leak

commit b0e573f186
    ofz#29030 Abrt in xlsfuzzer

commit 95407c3916
    ofz#28902 uncaught exception

commit 45175d655a
    oss-fuzz: tgafuzzer doesn't pass sanity check

commit b82fc702ba
    oss-fuzz: psdfuzzer doesn't pass sanity check

commit e7c76d604a
    oss-fuzz: epsfuzzer doesn't pass sanity check

commit 901e5e7c91
    oss-fuzz: xlsfuzzer doesn't pass sanity check

commit 127bfab61c
    oss-fuzz: pngfuzzer doesn't pass sanity check

commit 77387ae00a
    oss-fuzz: mtpfuzzer doesn't pass sanity check

commit 974ffa79b0
    oss-fuzz: xlsxfuzzer doesn't pass sanity check

commit 6d6d104cbb
    oss-fuzz: bmpfuzzer doesn't pass sanity check

commit a7d1d107ec
    oss-fuzz: qpwfuzzer doesn't pass sanity check

commit 898993aa62
    oss-fuzz: pcxfuzzer doesn't pass sanity check

throw/catch parts of
commit 8c9a4ff511
    throw exception in SvStream when reading past end of file

Change-Id: Ic49c249768b17b64d8e868655dbc05b31906c2e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109621
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-20 16:20:25 +01:00
..
2021-01-15 08:08:40 +01:00