You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there. I've come across a problematic .doc file that is causing an infinite loop in get_sector_list.
It looks like the 2nd half of this .doc file is all null, so it is definitely damaged & invalid, but it would be nice to avoid the infinite loop.
In this specific case, the loop starts off with j = 0, which results in the next j value being read from sectors[312], which is all null bytes due to the file corruption. This results in an infinite loop with j = 0.
I noticed that the chkd array is not being checked. Adding if (chkd[j]) break;at the top of the loop avoids the infinite loop and results in a later exception. Perhaps it's better to throw immediately inside the loop?