bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] [PATCH 3/5] Fix for extracting multi-volume archives


From: Pavel Raiskup
Subject: [Bug-tar] [PATCH 3/5] Fix for extracting multi-volume archives
Date: Fri, 2 Nov 2012 14:45:43 +0100

Do not fail when second or subsequent name of volume is bad.  This bug is
covered by multiv09.at test.

* src/buffer.c: Update to not fail.
---
 src/buffer.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/buffer.c b/src/buffer.c
index 562996f..6789907 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1435,14 +1435,15 @@ try_new_volume (void)
       break;
 
     default:
-      break;
+      RETURN_NOT_CONTINUED;
     }
 
   if (bufmap_head)
     {
       uintmax_t s;
-      if (!continued_file_name
-          || strcmp (continued_file_name, bufmap_head->file_name))
+      if (!continued_file_name)
+        RETURN_NOT_CONTINUED;
+      else if (strcmp (continued_file_name, bufmap_head->file_name))
         {
           if ((archive_format == GNU_FORMAT || archive_format == OLDGNU_FORMAT)
               && strlen (bufmap_head->file_name) >= NAME_FIELD_SIZE
-- 
1.7.11.7




reply via email to

[Prev in Thread] Current Thread [Next in Thread]