2
0
Эх сурвалжийг харах

fpreadtif: fixed read LZW stream at end of a bit length increase, bug #22724

git-svn-id: trunk@28287 -
Mattias Gaertner 11 жил өмнө
parent
commit
0d4fa26c51

+ 2 - 0
packages/fcl-image/src/fpreadtiff.pas

@@ -2256,6 +2256,8 @@ var
     p[s1.Count]:=s2.Data^;
     // increase TableCount
     inc(TableCount);
+    if ((SrcPos+3=Count) and (CurBitLength+SrcPosBit>16)) or
+       ((SrcPos+2=Count) and (CurBitLength+SrcPosBit<=16)) then exit;
     case TableCount+259 of
     512,1024,2048: inc(CurBitLength);
     end;