View Issue Details

IDProjectCategoryView StatusLast Update
0035134FPCFCLpublic2019-02-25 11:28
ReporterAnton Kavalenka Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86-64-linux 
Product Version3.3.1 
Target Version3.2.0Fixed in Version3.3.1 
Summary0035134: fpreadgif: r40995 broke paletted GIF reading
DescriptionAttached slightly modified test from fcl-image/examples/imgconv.pp

Patch attached which reverts r40995 changes.
Assumption that current stream pos is outside of stream is simply wrong, because
stream analysis returns to the previously stored OldPos

Stream.Position:=OldPos;
Steps To Reproducetry to run
./imgconv G image.gif PI image.png
TagsNo tags attached.
Fixed in Revision41409
FPCOldBugId
FPCTarget
Attached Files

Relationships

related to 0034919 resolvedMarco van de Voort Gif reader in FPC hangs when trying to read the attached gif file 

Activities

Anton Kavalenka

2019-02-21 21:02

reporter  

imgconv.pp (4,939 bytes)

Anton Kavalenka

2019-02-21 21:02

reporter  

image.gif (37,962 bytes)   
image.gif (37,962 bytes)   

Anton Kavalenka

2019-02-21 21:03

reporter  

fpreadgif.diff (851 bytes)   
--- /projects/fpc/packages/fcl-image/src/fpreadgif.pas	2019-01-22 18:17:21.365970632 +0300
+++ /projects/fpc/packages/fcl-image/examples/fpreadgif.pas	2019-02-21 22:51:32.222374995 +0300
@@ -303,8 +303,8 @@
       end;
     until (B = 0)  or (Stream.Position>=Stream.Size);
     
-    if Stream.Position>=Stream.Size then 
-      Exit(False);
+   { if Stream.Position>=Stream.Size then 
+      Exit(False); }
 
     Progress(psRunning, trunc(100.0 * (Stream.position / Stream.size)),
              False, Rect(0,0,0,0), '', ContProgress);
@@ -323,8 +323,8 @@
       end;
     until (B = 0) or (Stream.Position>=Stream.Size);
     
-    if Stream.Position>=Stream.Size then
-       Exit(False);
+   { if Stream.Position>=Stream.Size then
+       Exit(False); }
               
 
     Progress(psRunning, trunc(100.0 * (Stream.position / Stream.size)),
fpreadgif.diff (851 bytes)   

Michael Van Canneyt

2019-02-22 09:04

administrator   ~0114345

Applied, tested (on original problem as well) and committed. Thanks for the patch!

Issue History

Date Modified Username Field Change
2019-02-21 21:02 Anton Kavalenka New Issue
2019-02-21 21:02 Anton Kavalenka File Added: imgconv.pp
2019-02-21 21:02 Anton Kavalenka File Added: image.gif
2019-02-21 21:03 Anton Kavalenka File Added: fpreadgif.diff
2019-02-21 21:07 Marco van de Voort Relationship added related to 0034919
2019-02-22 09:04 Michael Van Canneyt Assigned To => Michael Van Canneyt
2019-02-22 09:04 Michael Van Canneyt Status new => assigned
2019-02-22 09:04 Michael Van Canneyt Fixed in Revision => 41409
2019-02-22 09:04 Michael Van Canneyt Note Added: 0114345
2019-02-22 09:04 Michael Van Canneyt Status assigned => resolved
2019-02-22 09:04 Michael Van Canneyt Fixed in Version => 3.3.1
2019-02-22 09:04 Michael Van Canneyt Resolution open => fixed
2019-02-22 09:04 Michael Van Canneyt Target Version => 3.2.0
2019-02-25 11:28 Anton Kavalenka Status resolved => closed