diff options
author | 2011-10-18 22:22:16 +0000 | |
---|---|---|
committer | 2011-10-18 22:22:16 +0000 | |
commit | 0a18965cc695ed5e97f579a42095e913111d46f1 (patch) | |
tree | f56a168eb27c3d62638828f339ce259facd59121 /app-misc/strigi/files | |
parent | Does not work with python-3, bug 387533 (diff) | |
download | historical-0a18965cc695ed5e97f579a42095e913111d46f1.tar.gz historical-0a18965cc695ed5e97f579a42095e913111d46f1.tar.bz2 historical-0a18965cc695ed5e97f579a42095e913111d46f1.zip |
Fix crash when parsing pdf, bug 387049
Package-Manager: portage-2.1.10.28/cvs/Linux x86_64
Diffstat (limited to 'app-misc/strigi/files')
-rw-r--r-- | app-misc/strigi/files/strigi-0.7.6-crash.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app-misc/strigi/files/strigi-0.7.6-crash.patch b/app-misc/strigi/files/strigi-0.7.6-crash.patch new file mode 100644 index 000000000000..8696a47dc51b --- /dev/null +++ b/app-misc/strigi/files/strigi-0.7.6-crash.patch @@ -0,0 +1,27 @@ +this was originally (now adapted for gentoo) +commit 23d5ce636b7897dc3f233a5293f3164dac50566d +Author: Jos van den Oever <jos@vandenoever.info> +Date: Sun Jul 31 12:32:44 2011 +0200 + + Revert patch that breaks parsing of PDF files. + The offending patch was 672c8b7b3cb4400bc505421f4cc70cf742ed9df0. + +diff -ruN strigi-0.7.6.orig/libstreamanalyzer/lib/pdf/pdfparser.cpp strigi-0.7.6/libstreamanalyzer/lib/pdf/pdfparser.cpp +--- strigi-0.7.6.orig/libstreamanalyzer/lib/pdf/pdfparser.cpp 2011-07-26 19:12:39.000000000 +0200 ++++ strigi-0.7.6/libstreamanalyzer/lib/pdf/pdfparser.cpp 2011-10-19 00:18:51.583639819 +0200 +@@ -35,12 +35,13 @@ + PdfParser::read(int32_t min, int32_t max) { + int32_t off = (int32_t)(pos-start); + int32_t d = (int32_t)(stream->position() - bufferStart); +- bufferStart += off; ++ min += d; ++ if (max > 0) max += d; + stream->reset(bufferStart); + int32_t n = stream->read(start, min, max); + // printf("objstart %i %i\n", d, n); + if (n < min) return stream->status(); +- pos = start; ++ pos = start + off; + end = start + n; + return Ok; + } |