[vhffs-dev] [1335] Fixed infinite loop in readdir(), I really don' t know how it managed to work fine

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1335
Author:   gradator
Date:     2009-02-08 01:15:35 +0100 (Sun, 08 Feb 2009)

Log Message:
-----------
Fixed infinite loop in readdir(), I really don't know how it managed to work fine

Modified Paths:
--------------
    trunk/vhffs-fs/vhffsfs.c


Modified: trunk/vhffs-fs/vhffsfs.c
===================================================================
--- trunk/vhffs-fs/vhffsfs.c	2009-02-07 07:28:42 UTC (rev 1334)
+++ trunk/vhffs-fs/vhffsfs.c	2009-02-08 00:15:35 UTC (rev 1335)
@@ -1270,14 +1270,12 @@
 	struct dirent *de;
 	char **vdirs;
 
-	//(void) path;
-	seekdir(dp, offset);
 	while ((de = readdir(dp)) != NULL) {
 		struct stat st;
 		memset(&st, 0, sizeof(st));
 		st.st_ino = de->d_ino;
 		st.st_mode = de->d_type << 12;
-		if (filler(buf, de->d_name, &st, telldir(dp)))
+		if (filler(buf, de->d_name, &st, 0))
 			break;
 	}
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/