Kaydet (Commit) bd030a57 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Thorsten Behrens

EMF+ records don't need payload all the time

Fix for fdo#39517. Looking through the emf+ records, it looks like the
assumption made that the minimum valid record length is 12 + non-0
length payload isnt' right, looks like that the minimum valid record
length is just 12, i.e. no need for a payload.
üst 67f11e53
......@@ -275,7 +275,7 @@ void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC)
sal_uInt32 nRemainder = length >= 4 ? length-4 : length;
const size_t nRequiredHeaderSize = 12;
while (nRemainder > nRequiredHeaderSize)
while (nRemainder >= nRequiredHeaderSize)
{
sal_uInt16 type(0), flags(0);
sal_uInt32 size(0), dataSize(0);
......
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