Re: fsck_msdos: fix possible infinite loop

2014-06-14 Thread Kenneth Westerback
On 14 June 2014 11:57, Tobias Stoeckmann wrote: > On Sat, Jun 14, 2014 at 11:25:22AM -0400, Kenneth Westerback wrote: >> > /* follow the chain to its end (hopefully) */ >> > - for (p = head; >> > + for (len = fat[head].length, p = head; >> >

Re: fsck_msdos: fix possible infinite loop

2014-06-14 Thread Tobias Stoeckmann
On Sat, Jun 14, 2014 at 11:25:22AM -0400, Kenneth Westerback wrote: > > /* follow the chain to its end (hopefully) */ > > - for (p = head; > > + for (len = fat[head].length, p = head; > > (n = fat[p].next) >= CLUST_FIRST && n < > > b

Re: fsck_msdos: fix possible infinite loop

2014-06-14 Thread Kenneth Westerback
On 14 June 2014 09:09, Tobias Stoeckmann wrote: > Hi, > > fsck_msdos is prone to an infinite loop if cluster chains in the > filesystem are infinite: FAT handles clusters as linked lists, and at > worst this list can be cyclic. > > Android included a fix from Samsung for this issue, with the commi

fsck_msdos: fix possible infinite loop

2014-06-14 Thread Tobias Stoeckmann
Hi, fsck_msdos is prone to an infinite loop if cluster chains in the filesystem are infinite: FAT handles clusters as linked lists, and at worst this list can be cyclic. Android included a fix from Samsung for this issue, with the commit b6ee08aadb580341a4d80943741b80de16a88b5d: https://android.