delete unused patches
This commit is contained in:
parent
04225c8f53
commit
dd26202bcd
@ -1,61 +0,0 @@
|
||||
diff -urN ../qpdf-4.0.1.orig/ChangeLog ./ChangeLog
|
||||
--- ../qpdf-4.0.1.orig/ChangeLog 2013-01-17 14:51:04.000000000 +0000
|
||||
+++ ./ChangeLog 2013-03-04 21:15:53.952108469 +0000
|
||||
@@ -1,3 +1,13 @@
|
||||
+2013-02-23 Jay Berkenbilt <ejb@ql.org>
|
||||
+
|
||||
+ * Bug fix: properly handle overridden compressed objects. When
|
||||
+ caching objects from an object stream, only cache objects that,
|
||||
+ based on the xref table, would actually be resolved into this
|
||||
+ stream. Prior to this fix, if an object stream A contained an
|
||||
+ object B that was overridden by an appended section of the file,
|
||||
+ qpdf would cache the old value of B if any non-overridden member
|
||||
+ of A was accessed before B. This commit fixes that bug.
|
||||
+
|
||||
2013-01-17 Jay Berkenbilt <ejb@ql.org>
|
||||
|
||||
* 4.0.1: release
|
||||
diff -urN ../qpdf-4.0.1.orig/libqpdf/QPDF.cc ./libqpdf/QPDF.cc
|
||||
--- ../qpdf-4.0.1.orig/libqpdf/QPDF.cc 2013-01-17 14:51:04.000000000 +0000
|
||||
+++ ./libqpdf/QPDF.cc 2013-03-04 21:15:53.952108469 +0000
|
||||
@@ -1538,20 +1538,31 @@
|
||||
offsets[num] = offset + first;
|
||||
}
|
||||
|
||||
+ // To avoid having to read the object stream multiple times, store
|
||||
+ // all objects that would be found here in the cache. Remember
|
||||
+ // that some objects stored here might have been overridden by new
|
||||
+ // objects appended to the file, so it is necessary to recheck the
|
||||
+ // xref table and only cache what would actually be resolved here.
|
||||
for (std::map<int, int>::iterator iter = offsets.begin();
|
||||
iter != offsets.end(); ++iter)
|
||||
{
|
||||
int obj = (*iter).first;
|
||||
- int offset = (*iter).second;
|
||||
- input->seek(offset, SEEK_SET);
|
||||
- QPDFObjectHandle oh = readObject(input, "", obj, 0, true);
|
||||
-
|
||||
- // Store in cache
|
||||
ObjGen og(obj, 0);
|
||||
-
|
||||
- this->obj_cache[og] =
|
||||
- ObjCache(QPDFObjectHandle::ObjAccessor::getObject(oh),
|
||||
- end_before_space, end_after_space);
|
||||
+ QPDFXRefEntry const& entry = this->xref_table[og];
|
||||
+ if ((entry.getType() == 2) &&
|
||||
+ (entry.getObjStreamNumber() == obj_stream_number))
|
||||
+ {
|
||||
+ int offset = (*iter).second;
|
||||
+ input->seek(offset, SEEK_SET);
|
||||
+ QPDFObjectHandle oh = readObject(input, "", obj, 0, true);
|
||||
+ this->obj_cache[og] =
|
||||
+ ObjCache(QPDFObjectHandle::ObjAccessor::getObject(oh),
|
||||
+ end_before_space, end_after_space);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ //QTC::TC("qpdf", "QPDF not caching overridden objstm object");
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
diff -urN ../qpdf-4.0.1.orig/qpdf/qpdf.cc ./qpdf/qpdf.cc
|
||||
--- ../qpdf-4.0.1.orig/qpdf/qpdf.cc 2013-01-17 14:51:04.000000000 +0000
|
||||
+++ ./qpdf/qpdf.cc 2013-03-04 21:07:56.361335897 +0000
|
||||
@@ -1574,7 +1574,7 @@
|
||||
// This prevents those objects from being preserved by
|
||||
// being referred to from other places, such as the
|
||||
// outlines dictionary.
|
||||
- for (int pageno = 0; pageno < (int)orig_pages.size(); ++pageno)
|
||||
+ for (size_t pageno = 0; pageno < orig_pages.size(); ++pageno)
|
||||
{
|
||||
if (selected_from_orig.count(pageno) == 0)
|
||||
{
|
||||
Loading…
Reference in New Issue
Block a user