Commit 8ef5cfad83616cc52d3987bcc34a035dd799901d
Committed by
GitHub
Merge pull request #1442 from m-holger/i1435
Don't set tree root /Limits in NNTreeIterator::resetLimits (fixes #1435)
Showing
3 changed files
with
12 additions
and
10 deletions
examples/qtest/name-number-tree/out.pdf
| ... | ... | @@ -38,10 +38,6 @@ endobj |
| 38 | 38 | 6 0 R |
| 39 | 39 | 7 0 R |
| 40 | 40 | ] |
| 41 | - /Limits [ | |
| 42 | - 7 | |
| 43 | - 343 | |
| 44 | - ] | |
| 45 | 41 | >> |
| 46 | 42 | endobj |
| 47 | 43 | |
| ... | ... | @@ -177,15 +173,15 @@ xref |
| 177 | 173 | 0000000052 00000 n |
| 178 | 174 | 0000000194 00000 n |
| 179 | 175 | 0000000339 00000 n |
| 180 | -0000000462 00000 n | |
| 181 | -0000000551 00000 n | |
| 182 | -0000000878 00000 n | |
| 183 | -0000001233 00000 n | |
| 176 | +0000000432 00000 n | |
| 177 | +0000000521 00000 n | |
| 178 | +0000000848 00000 n | |
| 179 | +0000001203 00000 n | |
| 184 | 180 | trailer << |
| 185 | 181 | /Root 1 0 R |
| 186 | 182 | /Size 8 |
| 187 | 183 | /ID [<31415926535897932384626433832795><31415926535897932384626433832795>] |
| 188 | 184 | >> |
| 189 | 185 | startxref |
| 190 | -1581 | |
| 186 | +1551 | |
| 191 | 187 | %%EOF | ... | ... |
libqpdf/NNTree.cc
| ... | ... | @@ -203,7 +203,7 @@ NNTreeIterator::resetLimits(QPDFObjectHandle node, std::list<PathElement>::itera |
| 203 | 203 | changed = false; |
| 204 | 204 | } |
| 205 | 205 | } |
| 206 | - if (changed) { | |
| 206 | + if (changed && !node.isSameObjectAs(path.begin()->node)) { | |
| 207 | 207 | node.replaceKey("/Limits", limits); |
| 208 | 208 | } |
| 209 | 209 | } else { | ... | ... |
manual/release-notes.rst
| ... | ... | @@ -24,6 +24,12 @@ more detail. |
| 24 | 24 | |
| 25 | 25 | - Add missing QPDFFormFieldObjectHelper::isChecked implementation. |
| 26 | 26 | |
| 27 | + - Fix bug in QPDFNameTreeObjectHelper / QPDFNumberTreeObjectHelper. Under | |
| 28 | + certain conditions tree insertions resulted in a /Range entry being | |
| 29 | + written to the tree root node, which is not permitted. One of the | |
| 30 | + possible consequences is that some readers would not recognize | |
| 31 | + embedded / attached files. | |
| 32 | + | |
| 27 | 33 | - Build fixes |
| 28 | 34 | |
| 29 | 35 | - Fix Android build issues. | ... | ... |