From eab70147cfc3975aaede4df5cdd55ef05e04deac Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Sun, 26 May 2002 13:13:46 +0000 Subject: 2002-05-26 Marcus Brinkmann * magic.c (trivfs_S_dir_readdir): Increment I after comparing it with ENTRY, to fix off-by-one error. --- trans/ChangeLog | 5 +++++ trans/magic.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'trans') 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 + + * magic.c (trivfs_S_dir_readdir): Increment I after comparing it + with ENTRY, to fix off-by-one error. + 2002-05-23 Roland McGrath * 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; -- cgit v1.2.3