aboutsummaryrefslogtreecommitdiffstats
path: root/qpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2018-06-22 02:33:38 +0200
committerJay Berkenbilt <ejb@ql.org>2018-06-22 02:34:45 +0200
commitddd78c1b7f53f09710431d58cd94659271f325cc (patch)
tree0522d6b1559f7c94f001113f5a5e10bca737e37f /qpdf
parent84cd53f5af72f8d1da5c6e73ebf7997243bf0b2c (diff)
downloadqpdf-ddd78c1b7f53f09710431d58cd94659271f325cc.tar.zst
Fix QPDFObjectHandle::shallowCopy
It's not really a shallow copy. It just doesn't cross indirect object boundaries. The old implementation had a bug that would cause multiple shallow copies of the same object to share memory, which was not the intention.
Diffstat (limited to 'qpdf')
-rw-r--r--qpdf/qtest/qpdf/good10.qdf50
1 files changed, 28 insertions, 22 deletions
diff --git a/qpdf/qtest/qpdf/good10.qdf b/qpdf/qtest/qpdf/good10.qdf
index 957168c8..77b7d377 100644
--- a/qpdf/qtest/qpdf/good10.qdf
+++ b/qpdf/qtest/qpdf/good10.qdf
@@ -5,17 +5,22 @@
%% Original object ID: 1 0
1 0 obj
<<
- /Pages 2 0 R
+ /Pages 3 0 R
/Type /Catalog
>>
endobj
-%% Original object ID: 2 0
+%% Original object ID: 8 0
2 0 obj
+null
+endobj
+
+%% Original object ID: 2 0
+3 0 obj
<<
/Count 1
/Kids [
- 3 0 R
+ 4 0 R
]
/Type /Pages
>>
@@ -23,21 +28,21 @@ endobj
%% Page 1
%% Original object ID: 3 0
-3 0 obj
+4 0 obj
<<
- /Contents 4 0 R
+ /Contents 5 0 R
/MediaBox [
0
0
612
792
]
- /Parent 2 0 R
+ /Parent 3 0 R
/Resources <<
/Font <<
- /F1 6 0 R
+ /F1 7 0 R
>>
- /ProcSet 7 0 R
+ /ProcSet 8 0 R
>>
/Type /Page
>>
@@ -45,9 +50,9 @@ endobj
%% Contents for page 1
%% Original object ID: 4 0
-4 0 obj
+5 0 obj
<<
- /Length 5 0 R
+ /Length 6 0 R
>>
stream
BT
@@ -58,12 +63,12 @@ ET
endstream
endobj
-5 0 obj
+6 0 obj
44
endobj
%% Original object ID: 6 0
-6 0 obj
+7 0 obj
<<
/BaseFont /Helvetica
/Encoding /WinAnsiEncoding
@@ -74,7 +79,7 @@ endobj
endobj
%% Original object ID: 5 0
-7 0 obj
+8 0 obj
[
/PDF
/Text
@@ -82,29 +87,30 @@ endobj
endobj
xref
-0 8
+0 9
0000000000 65535 f
0000000052 00000 n
0000000133 00000 n
-0000000242 00000 n
-0000000484 00000 n
-0000000583 00000 n
-0000000629 00000 n
-0000000774 00000 n
+0000000181 00000 n
+0000000290 00000 n
+0000000532 00000 n
+0000000631 00000 n
+0000000677 00000 n
+0000000822 00000 n
trailer <<
/QTest [
1
(2)
- null
+ 2 0 R
0.0
-0.0
0.
-0.
]
/Root 1 0 R
- /Size 8
+ /Size 9
/ID [<31415926535897932384626433832795><31415926535897932384626433832795>]
>>
startxref
-809
+857
%%EOF