Package: catdoc Version: 1:0.95-3 Tags: patch Create a simple document in LibreOffice Writer 5.2.7.2 containing a single line: "Hello world!" and save it using the "Microsoft Word 97-2003 (.doc)" format. Run "catdoc" on the created document. The output is empty.
Details: this bug was introduced in version 1:0.95 and is not reproducible with previous versions of catdoc. Applying the attached patch to the source code in version 0.95 (catdoc_0.95.orig.tar.gz) seems to fix the issue.
diff --git a/src/ole.c b/src/ole.c index 807ed5b..dbcda42 100644 --- a/src/ole.c +++ b/src/ole.c @@ -337,7 +337,7 @@ FILE *ole_readdir(FILE *f) { e->blocks=NULL; nLen=getshort(oleBuf,0x40); - if (nLen > (OLENAMELENGTH * 2)) { + if (nLen > OLENAMELENGTH) { free(e); return NULL; }