diff options
-rw-r--r-- | vcl/source/filter/sgvmain.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx index 35cade1d954a..63d756aaf5ef 100644 --- a/vcl/source/filter/sgvmain.cxx +++ b/vcl/source/filter/sgvmain.cxx @@ -782,11 +782,11 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut ) SAL_WARN("vcl", "file is shorter than requested len"); nSize = nRemainingSize; } - UCHAR *pBuffer = new UCHAR[nSize+1]; // add one for LookAhead at CK-separation - size_t nReadSize = rInp.ReadBytes(pBuffer, nSize); - pBuffer[nReadSize] = 0; - if (!rInp.GetError() && nReadSize == aText.BufSize) aText.Draw(rOut, pBuffer); - delete[] pBuffer; + std::vector<UCHAR> aBuffer(nSize+1); // add one for LookAhead at CK-separation + size_t nReadSize = rInp.ReadBytes(aBuffer.data(), nSize); + aBuffer[nReadSize] = 0; + if (!rInp.GetError() && nReadSize == aText.BufSize) + aText.Draw(rOut, aBuffer.data()); } } break; case ObjBmap: { |