vcl/source/filter/GraphicNativeMetadata.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit 855df248c8a380e253a35feefec21ebc1dee1aca Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Mon Aug 8 04:52:28 2016 +0200 don't try to memcpy from and to a nullptr See e.g. http://crashreport.libreoffice.org/stats/crash_details/2218a489-b64c-4193-a7d4-cd01c6a607cb Change-Id: I6c123d3e9e5c6dbcb7756a686503904cbfd944a4 Reviewed-on: https://gerrit.libreoffice.org/27948 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/vcl/source/filter/GraphicNativeMetadata.cxx b/vcl/source/filter/GraphicNativeMetadata.cxx index 2f9880c..aea930d 100644 --- a/vcl/source/filter/GraphicNativeMetadata.cxx +++ b/vcl/source/filter/GraphicNativeMetadata.cxx @@ -37,7 +37,11 @@ bool GraphicNativeMetadata::read(Graphic& rGraphic) GfxLink aLink = rGraphic.GetLink(); if ( aLink.GetType() != GfxLinkType::NativeJpg ) return false; + sal_uInt32 aDataSize = aLink.GetDataSize(); + if (!aDataSize) + return false; + std::unique_ptr<sal_uInt8[]> aBuffer(new sal_uInt8[aDataSize]); memcpy(aBuffer.get(), aLink.GetData(), aDataSize); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits