summaryrefslogtreecommitdiff
path: root/trans
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2002-05-26 13:13:46 +0000
committerMarcus Brinkmann <marcus@gnu.org>2002-05-26 13:13:46 +0000
commiteab70147cfc3975aaede4df5cdd55ef05e04deac (patch)
treedc2f70d3415144f8dd040de62f56e020e65780f2 /trans
parent3b2a1e43f565f35183dd28ad9340747f20b7c7ee (diff)
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.
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;