Kaydet (Commit) 1d203f2d authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Avoid undefined signed integer overflow

Change-Id: Idbb8109c36dfe1c8ed4acb8dff1a1538e386abd8
üst 7bc00821
......@@ -967,13 +967,8 @@ bool StgDirStrm::Store()
void* StgDirStrm::GetEntry( sal_Int32 n, bool bDirty )
{
if( n < 0 )
return NULL;
n *= STGENTRY_SIZE;
if( n >= nSize )
return NULL;
return GetPtr( n, true, bDirty );
return n < 0 || n >= nSize / STGENTRY_SIZE
? NULL : GetPtr( n * STGENTRY_SIZE, true, bDirty );
}
// Find a dir entry.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment