Skip to content

Commit 9b6f045

Browse files
committed
SERVER-6856 do not read past the end of a record
1 parent 9e3c6bb commit 9b6f045

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mongo/db/prefetch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ namespace mongo {
164164
_dummy_char += *(result.objdata() + i);
165165
}
166166
// hit the last page, in case we missed it above
167-
_dummy_char += *(result.objdata() + result.objsize());
167+
_dummy_char += *(result.objdata() + result.objsize() - 1);
168168
}
169169
}
170170
catch(const DBException& e) {

0 commit comments

Comments
 (0)