Index: core/fpdfapi/fpdf_parser/cpdf_parser.cpp |
diff --git a/core/fpdfapi/fpdf_parser/cpdf_parser.cpp b/core/fpdfapi/fpdf_parser/cpdf_parser.cpp |
index 4ba43678b80c3ca2198ad22257fa07b39ea9a040..a3e579ad6938e3c2597ae5ce060ebf3a7d10da33 100644 |
--- a/core/fpdfapi/fpdf_parser/cpdf_parser.cpp |
+++ b/core/fpdfapi/fpdf_parser/cpdf_parser.cpp |
@@ -931,9 +931,9 @@ FX_BOOL CPDF_Parser::RebuildCrossRef() { |
} |
pos += size; |
- // If the position has not changed at all in a loop iteration, then break |
- // out to prevent infinite looping. |
- if (pos == saved_pos) |
+ // If the position has not changed at all or went backwards in a loop |
+ // iteration, then break out to prevent infinite looping. |
+ if (pos <= saved_pos) |
break; |
} |