E-book viewer: Fix a rare hang caused by an infinite loop when decoding a CFI

This commit is contained in:
Kovid Goyal 2014-09-06 23:26:45 +05:30
parent 9c244a873b
commit 4e8fbeae22
2 changed files with 1 additions and 0 deletions

Binary file not shown.

View File

@ -279,6 +279,7 @@ class CanonicalFragmentIdentifier
node = child node = child
if not child if not child
error = "No matching child found for CFI: " + cfi error = "No matching child found for CFI: " + cfi
cfi = cfi.substr(r[0].length)
break break
index |= 1 # Increment index by 1 if it is even index |= 1 # Increment index by 1 if it is even
if child.nodeType == 1 if child.nodeType == 1