diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2014-07-14 23:55:04 +0300 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-07-15 09:54:51 +0000 |
commit | 70c5401aa3b063d0f275042a48a54f42c1f54c03 (patch) | |
tree | fe5eee8957ea61672d3d20139b53a03d10c81db8 /sd | |
parent | 76e02dba9769bf1ea8c79c189b924f4d79f97ca4 (diff) |
fdo#81284 Don't write to zero length files
Change-Id: I4eddcda3977f43b39abdaa8d9089ff661092361c
Reviewed-on: https://gerrit.libreoffice.org/10310
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/unoidl/sddetect.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx index e8ee02e0398a..161d11fb7791 100644 --- a/sd/source/ui/unoidl/sddetect.cxx +++ b/sd/source/ui/unoidl/sddetect.cxx @@ -351,6 +351,12 @@ OUString SAL_CALL SdFilterDetect::detect( Sequence< beans::PropertyValue >& lDes pStm = aMedium.GetInStream(); if (!pStm) pFilter = NULL; + else + { + pStm->Seek( STREAM_SEEK_TO_BEGIN ); + if (pStm->remainingSize() == 0) + pFilter = NULL; + } } if (pFilter && pStm) |