nfs4: Fix off-by-one bug in READDIR decoding

This commit is contained in:
Pawel Dziepak
2012-06-29 02:14:38 +02:00
parent b0368e77c9
commit 5310ed9ee1
@@ -212,7 +212,7 @@ ReplyInterpreter::ReadDir(uint64* cookie, DirEntry** dirents, uint32* _count,
return B_NO_MEMORY;
isNext = fReply->Stream().GetBoolean();
while (isNext && count <= *_count) {
while (isNext && count < *_count) {
cookie[0] = fReply->Stream().GetUHyper();
entries[count].fName = fReply->Stream().GetString();