summaryrefslogtreecommitdiff
path: root/trans
diff options
context:
space:
mode:
Diffstat (limited to 'trans')
-rw-r--r--trans/ChangeLog5
-rw-r--r--trans/magic.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/trans/ChangeLog b/trans/ChangeLog
index 2b236a3e..0bd306a7 100644
--- a/trans/ChangeLog
+++ b/trans/ChangeLog
@@ -1,3 +1,8 @@
+2002-05-26 Marcus Brinkmann <marcus@gnu.org>
+
+ * magic.c (trivfs_S_dir_readdir): Increment I after comparing it
+ with ENTRY, to fix off-by-one error.
+
2002-05-23 Roland McGrath <roland@frob.com>
* fakeroot.c (netfs_report_access): Always report O_RDWR|O_EXEC.
diff --git a/trans/magic.c b/trans/magic.c
index e207ca6f..40ce29c1 100644
--- a/trans/magic.c
+++ b/trans/magic.c
@@ -260,7 +260,7 @@ trivfs_S_dir_readdir (struct trivfs_protid *cred,
i = 0;
for (p = dirbuf; p < dirbuf + dirbufsize;
p += ((struct dirent *) p)->d_reclen)
- if (++i == entry)
+ if (i++ == entry)
break;
*data = p;
*datalen = dirbuf + dirbufsize - p;