Did SELinux complain about THIS?

This commit is contained in:
Siana Gearz
2011-10-31 05:24:00 +01:00
parent cc45a24aff
commit f386fc75df

View File

@@ -277,6 +277,14 @@ LLPluginSharedMemoryPlatformImpl::~LLPluginSharedMemoryPlatformImpl()
bool LLPluginSharedMemory::map(void) bool LLPluginSharedMemory::map(void)
{ {
llassert(mSize);
if (!mSize)
{
LL_DEBUGS("Plugin") << "Tried to mmap zero length" << LL_ENDL;
return false;
}
llassert(mImpl->mSharedMemoryFD != -1);
llassert(fcntl(mImpl->mSharedMemoryFD, F_GETFL) != -1);
mMappedAddress = ::mmap(NULL, mSize, PROT_READ | PROT_WRITE, MAP_SHARED, mImpl->mSharedMemoryFD, 0); mMappedAddress = ::mmap(NULL, mSize, PROT_READ | PROT_WRITE, MAP_SHARED, mImpl->mSharedMemoryFD, 0);
if(mMappedAddress == NULL) if(mMappedAddress == NULL)
{ {