Escher images

It looks to me like the check on opcode for BIFF records in an Escher
container is overly strict. I have a file here which contains a chart
with a massive JPEG background. Current 1.2 CVS crashes while trying to
handle that part of the document, but by adding BIFF_CHART_gelframe to the
list the JPEG is merely ignored (presumably not yet supported). Does
that make sense? Obviously the crash when an opcode doesn't match should
be fixed too, but I had no time to fully diagnose that.

My test document is XOR encrypted, and therefore can't be opened without
the XOR crypto patch (or its predecessor). The change needed to open this
without crashing is inline at the bottom of this mail, it's a one liner.
Unfortunately the document is not only encrypted, it's also confidential,
so if someone needs to take a look (Jody?) they'll have to email me off
list and agree to use it for research only and then destroy it.

diff -u -r1.100 ms-escher.c
--- ms-escher.c 14 Dec 2003 04:58:24 -0000      1.100
+++ ms-escher.c 16 Jan 2004 14:46:07 -0000
@@ -210,6 +210,7 @@
                        if (q->opcode != BIFF_MS_O_DRAWING &&
                            q->opcode != BIFF_MS_O_DRAWING_GROUP &&
                            q->opcode != BIFF_MS_O_DRAWING_SELECTION &&
+                           q->opcode != BIFF_CHART_gelframe &&
                            q->opcode != BIFF_CONTINUE) {
                                g_warning ("Unexpected record type 0x%x @ 0x%x;", q->opcode, q->streamPos);
                                return NULL;

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]