summaryrefslogtreecommitdiff
path: root/vcl/source/filter/jpeg
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-10 15:54:32 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-03-10 15:55:23 +0000
commit14cdcd154e9621ffdc4e00af7bc84b56d76d6cd4 (patch)
treed4076d956bb4a48bd862c91183f01df22e4b0ac1 /vcl/source/filter/jpeg
parent516bb69247c79ea0913856b9b053599f57ad90fb (diff)
min valid jpeg len is less than 512
our qa tests already include such, so this isn't right Change-Id: I86fb02bf353fb5b228db915f04db6e36cfb40c51
Diffstat (limited to 'vcl/source/filter/jpeg')
-rw-r--r--vcl/source/filter/jpeg/JpegReader.cxx19
1 files changed, 0 insertions, 19 deletions
diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx
index 7490cb305732..ad67332ae268 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -30,7 +30,6 @@
#include <tools/fract.hxx>
#include <memory>
-#define JPEG_MIN_READ 512
#define BUFFER_SIZE 4096
/*
@@ -275,24 +274,6 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
{
ReadState eReadState;
bool bRet = false;
- sal_uInt8 cDummy;
-
- // TODO: is it possible to get rid of this seek to the end?
- // check if the stream's end is already available
- mrStream.Seek( STREAM_SEEK_TO_END );
- mrStream.ReadUChar( cDummy );
- long nEndPosition = mrStream.Tell();
-
- // else check if at least JPEG_MIN_READ bytes can be read
- if( mrStream.GetError() == ERRCODE_IO_PENDING )
- {
- mrStream.ResetError();
- if( ( nEndPosition - mnFormerPos ) < JPEG_MIN_READ )
- {
- mrStream.Seek( mnLastPos );
- return JPEGREAD_NEED_MORE;
- }
- }
// seek back to the original position
mrStream.Seek( mnLastPos );