Chameleon

Issue 383: infinite loop

Reported by yes keen, Nov 4, 2014

msdos.c from r2326 to r2327 cause infinite loop
also in latest version
see the diff here

Index: i386/libsaio/msdos.c
===================================================================
--- i386/libsaio/msdos.c	(revision 2462)
+++ i386/libsaio/msdos.c	(working copy)
@@ -394,14 +394,14 @@
 			st->vfatchecksum = 0;
 			st->vfatnumber = 0;
 			st->nument++;
-			if (((int)(!st->root16 &&st->nument * sizeof 
(struct direntry))>=msdosclustersize)
-				|| ((int)(st->root16 &&st->nument * sizeof 
(struct direntry))>=msdosbps))
+			if ((!st->root16 && (int)(st->nument * sizeof 
(struct direntry))>=msdosclustersize)
+				|| (st->root16 && (int)(st->nument * sizeof 
(struct direntry))>=msdosbps))
 				st->nument = 0;
 			return dirp;
 		}
 		st->nument++;
-		if (((int)(!st->root16 &&st->nument * sizeof 
(struct direntry))>=msdosclustersize)
-			|| ((int)(st->root16 &&st->nument * sizeof (struct 
direntry))>=msdosbps))
+		if ((!st->root16 && (int)(st->nument * sizeof 
(struct direntry))>=msdosclustersize)
+			|| (st->root16 && (int)(st->nument * sizeof 
(struct direntry))>=msdosbps))
 			st->nument = 0;		
 	}
 }

Comment 1 by ErmaC , Nov 4, 2014

Could you try the latest trunk? 2466

ErmaC
Status: AwaitingInformation

Comment 2 by yes keen, Nov 5, 2014

code has been fixed 

'3.53 kB
 msdos.c 1 day 4 hours  2464 ifabio: Rollback changes for msdos.c 
(2327) thx to bltz'

Comment 3 by ErmaC , Nov 5, 2014

Status: Duplicate

Created: 4 years 8 months ago by yes keen

Updated: 4 years 8 months ago

Status: Duplicate

Followed by: 1 person

Labels:
Priority:Medium
Type:Defect