You've already forked lazarus-ccr
fpexif: Avoid crash when xmp data have trainling zero bytes.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9024 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -661,7 +661,8 @@ begin
|
||||
M_EOI, M_SOS:
|
||||
break;
|
||||
end;
|
||||
AStream.Position := p + size;
|
||||
p := p + Size;
|
||||
AStream.Position := p;
|
||||
end;
|
||||
|
||||
// Force writing of JFIF if it coexists with EXIF.
|
||||
|
@ -280,6 +280,14 @@ begin
|
||||
FData[1] := '<';
|
||||
end;
|
||||
|
||||
// The xml parser does not like zero bytes at the end --> remove them
|
||||
i := Length(FData);
|
||||
while (FData[i] = #0) and (i > 0) do
|
||||
begin
|
||||
dec(i);
|
||||
SetLength(FData, i);
|
||||
end;
|
||||
|
||||
AStream.Position := p;
|
||||
CreateTags;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user