[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH] pas-tar: Bugfix



! pas-tar: skipFile setzte kein EOF, fuehrte bei Iteration ohne Entpacken der letzten Datei zum Crash der Anwendung.
---
 trunk/src/modules/pas/lib/tar/tar.pas |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/trunk/src/modules/pas/lib/tar/tar.pas b/trunk/src/modules/pas/lib/tar/tar.pas
index 149ffbb..7ae47ae 100644
--- a/trunk/src/modules/pas/lib/tar/tar.pas
+++ b/trunk/src/modules/pas/lib/tar/tar.pas
@@ -254,6 +254,13 @@ begin
     end;
 
     ReadNextBlock(0);
+
+    if not end_of_archive and BufferIsZero() then begin
+        ReadNextBlock(0);
+        if not end_of_archive and BufferIsZero() then begin
+            end_of_archive := true;
+        end;
+    end;
 end;
 
 end.
-- 
1.5.6.3