Kaydet (Commit) d02e49d9 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#4476 Integer-overflow

Change-Id: I7ee197b396026fb25872f9e79c3be098329a5cee
Reviewed-on: https://gerrit.libreoffice.org/45467Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst af8431d8
......@@ -913,8 +913,9 @@ sal_Int32 StgDataStrm::Read( void* pBuf, sal_Int32 n )
if ( n < 0 )
return 0;
if( ( m_nPos + n ) > m_nSize )
n = m_nSize - m_nPos;
const auto nAvailable = m_nSize - m_nPos;
if (n > nAvailable)
n = nAvailable;
sal_Int32 nDone = 0;
while( n )
{
......
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