* FileMap::Translate() did not choke on negative offsets, and _Cache() does not

necessarily return an error in this case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32129 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-08-05 13:05:58 +00:00
parent ccee2a8b35
commit cfd22919f2
+3
View File
@@ -393,6 +393,9 @@ status_t
FileMap::Translate(off_t offset, size_t size, file_io_vec* vecs, size_t* _count,
size_t align)
{
if (offset < 0)
return B_BAD_VALUE;
MutexLocker _(fLock);
size_t maxVecs = *_count;