diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-07-11 08:52:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-07-11 14:47:38 +0200 |
commit | 093744321759b4e3d73d767459272addfb22cf04 (patch) | |
tree | d75fe6272a335869c2862340b4d57705a73fb398 /filter/source | |
parent | 35ba68fd471d7d2f50183a1ffb7348b1b069616d (diff) |
ofz#2538: avoid oom
and merge together checkSeeks
Change-Id: I341a09404280fb8d4acfbe2abaed47e2830af55f
Reviewed-on: https://gerrit.libreoffice.org/39800
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter/source')
-rw-r--r-- | filter/source/graphicfilter/ieps/ieps.cxx | 9 | ||||
-rw-r--r-- | filter/source/graphicfilter/iras/iras.cxx | 9 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 9 |
3 files changed, 0 insertions, 27 deletions
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx index 845b5ea854ff..d752a836ee3c 100644 --- a/filter/source/graphicfilter/ieps/ieps.cxx +++ b/filter/source/graphicfilter/ieps/ieps.cxx @@ -401,15 +401,6 @@ static bool RenderAsBMP(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r return RenderAsBMPThroughConvert(pBuf, nBytesRead, rGraphic); } -namespace -{ - bool checkSeek(SvStream &rSt, sal_uInt32 nOffset) - { - const sal_uInt64 nMaxSeek(rSt.Tell() + rSt.remainingSize()); - return (nOffset <= nMaxSeek && rSt.Seek(nOffset) == nOffset); - } -} - // this method adds a replacement action containing the original wmf or tiff replacement, // so the original eps can be written when storing to ODF. void CreateMtfReplacementAction( GDIMetaFile& rMtf, SvStream& rStrm, sal_uInt32 nOrigPos, sal_uInt32 nPSSize, diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx index 0f6dac97be75..4c878be321f7 100644 --- a/filter/source/graphicfilter/iras/iras.cxx +++ b/filter/source/graphicfilter/iras/iras.cxx @@ -78,15 +78,6 @@ RASReader::RASReader(SvStream &rRAS) { } -namespace -{ - bool checkSeek(SvStream &rSt, sal_uInt32 nOffset) - { - const sal_uInt64 nMaxSeek(rSt.Tell() + rSt.remainingSize()); - return (nOffset <= nMaxSeek && rSt.Seek(nOffset) == nOffset); - } -} - bool RASReader::ReadRAS(Graphic & rGraphic) { sal_uInt32 nMagicNumber; diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index a450efb226b9..a3afce6202cd 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -221,15 +221,6 @@ DffPropertyReader::DffPropertyReader( const SvxMSDffManager& rMan ) InitializePropSet( DFF_msofbtOPT ); } -namespace -{ - bool checkSeek(SvStream &rSt, sal_uInt32 nOffset) - { - const sal_uInt64 nMaxSeek(rSt.Tell() + rSt.remainingSize()); - return (nOffset <= nMaxSeek && rSt.Seek(nOffset) == nOffset); - } -} - void DffPropertyReader::SetDefaultPropSet( SvStream& rStCtrl, sal_uInt32 nOffsDgg ) const { const_cast<DffPropertyReader*>(this)->pDefaultPropSet.reset(); |