mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-14 02:44:58 +08:00
don't cache invalid offsets unless brute forced
don't cache objects parsed if their offset doesn't match the cross-reference offset, unless the object was parsed by a brute-force search operation. this is because 1 object may lie in 2 streams, 1 valid and 1 invalid. If the invalid stream is parsed first for another object then the valid stream will never be read.
This commit is contained in:
@@ -671,7 +671,7 @@
|
||||
|
||||
while (MoveNext())
|
||||
{
|
||||
objectLocationProvider.Cache((ObjectToken)CurrentToken);
|
||||
objectLocationProvider.Cache((ObjectToken)CurrentToken, true);
|
||||
}
|
||||
|
||||
if (!objectLocationProvider.TryGetCached(reference, out objectToken))
|
||||
|
Reference in New Issue
Block a user