* commit '16410d458fdf9915dc8cb82b1bae3949a8100124': Fix broken error check in Parcel::readBlob
This commit is contained in:
commit
328f9c259b
@ -1281,7 +1281,7 @@ status_t Parcel::readBlob(size_t len, ReadableBlob* outBlob) const
|
|||||||
if (fd == int(BAD_TYPE)) return BAD_VALUE;
|
if (fd == int(BAD_TYPE)) return BAD_VALUE;
|
||||||
|
|
||||||
void* ptr = ::mmap(NULL, len, PROT_READ, MAP_SHARED, fd, 0);
|
void* ptr = ::mmap(NULL, len, PROT_READ, MAP_SHARED, fd, 0);
|
||||||
if (!ptr) return NO_MEMORY;
|
if (ptr == MAP_FAILED) return NO_MEMORY;
|
||||||
|
|
||||||
outBlob->init(true /*mapped*/, ptr, len);
|
outBlob->init(true /*mapped*/, ptr, len);
|
||||||
return NO_ERROR;
|
return NO_ERROR;
|
||||||
|
Loading…
Reference in New Issue
Block a user