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

coverity#1190353 Argument cannot be negative

Change-Id: I32503188fb89087ac6db0ce634b46acaf645d3b5
üst e1d89089
......@@ -1532,13 +1532,13 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
{
SvMemoryStream aMemStream;
GZCodec aCodec;
sal_uInt32 nMemoryLength;
long nMemoryLength;
aCodec.BeginCompression();
nMemoryLength = aCodec.Decompress(rIStream, aMemStream);
aCodec.EndCompression();
if(!rIStream.GetError() )
if (!rIStream.GetError() && nMemoryLength >= 0)
{
SvgDataArray aNewData(new sal_uInt8[nMemoryLength]);
aMemStream.Seek(STREAM_SEEK_TO_BEGIN);
......
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