]> git.wh0rd.org - dump.git/commitdiff
Fix SIGSEGV in dump when dumping huge 2TB filesystems (bad inode map calculation)
authorStelian Pop <stelian@popies.net>
Mon, 22 Nov 2004 10:32:31 +0000 (10:32 +0000)
committerStelian Pop <stelian@popies.net>
Mon, 22 Nov 2004 10:32:31 +0000 (10:32 +0000)
CHANGES
THANKS
dump/tape.c

diff --git a/CHANGES b/CHANGES
index 3a2b9b7b4fcd1472452df9c83ccf73fdc4d8ae1f..5ae2f0a8f994b646c7d9ad3589abac5e6ccab20b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.258 2004/11/22 10:22:40 stelian Exp $
+$Id: CHANGES,v 1.259 2004/11/22 10:32:31 stelian Exp $
 
 Changes between versions 0.4b37 and 0.4b38 (released ????????????)
 ==================================================================
 
 Changes between versions 0.4b37 and 0.4b38 (released ????????????)
 ==================================================================
@@ -17,6 +17,11 @@ Changes between versions 0.4b37 and 0.4b38 (released ????????????)
        (excluded from dump). This will eliminate the 'missing
        file' warnings when doing 'restore -C'.
 
        (excluded from dump). This will eliminate the 'missing
        file' warnings when doing 'restore -C'.
 
+5.     Fix dump crash when backuping a huge (2TB) filesystem,
+       due to a bogus calculation on the inode map size.
+       Thanks to Kevin B. Haines <K.B.Haines@rl.ac.uk> for 
+       submitting the bug and testing the fix.
+
 Changes between versions 0.4b36 and 0.4b37 (released July 7, 2004)
 ==================================================================
 
 Changes between versions 0.4b36 and 0.4b37 (released July 7, 2004)
 ==================================================================
 
diff --git a/THANKS b/THANKS
index ca207bd418aba25526a087cae897e205cca90610..98a98e31eb3210e87d653abd99508fa38a49caba 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -1,4 +1,4 @@
-$Id: THANKS,v 1.86 2004/07/13 08:17:30 stelian Exp $
+$Id: THANKS,v 1.87 2004/11/22 10:32:31 stelian Exp $
 
 Dump and restore were written by the people of the CSRG at the University
 of California, Berkeley.
 
 Dump and restore were written by the people of the CSRG at the University
 of California, Berkeley.
@@ -52,6 +52,7 @@ Arcady Genkin         antipode@users.sourceforge.net
 Uwe Gohlke             uwe@ugsoft.de
 Ian Gordon             iangordon@users.sourceforge.net
 Ted Grzesik            tedgyz@roostme.com
 Uwe Gohlke             uwe@ugsoft.de
 Ian Gordon             iangordon@users.sourceforge.net
 Ted Grzesik            tedgyz@roostme.com
+Kevin B. Haines                K.B.Haines@rl.ac.uk
 Mike Harris            mharris@redhat.com
 Andreas Hasenack       andreas@conectiva.com.br
 Christian Haul         haul@informatik.tu-darmstadt.de
 Mike Harris            mharris@redhat.com
 Andreas Hasenack       andreas@conectiva.com.br
 Christian Haul         haul@informatik.tu-darmstadt.de
index 2df4d1e242772338f88bce5b9cf6bbd5e4b48cc7..6f829f88802083d8992b5ffd50462489c9298909 100644 (file)
@@ -37,7 +37,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: tape.c,v 1.86 2004/07/07 11:07:29 stelian Exp $";
+       "$Id: tape.c,v 1.87 2004/11/22 10:32:32 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
 #endif /* not lint */
 
 #include <config.h>
@@ -475,10 +475,14 @@ flushtape(void)
        }
 
        blks = 0;
        }
 
        blks = 0;
-       if (spcl.c_type != TS_END) {
-               for (i = 0; i < spcl.c_count; i++)
-                       if (spcl.c_addr[i] != 0)
-                               blks++;
+       if (spcl.c_type == TS_CLRI || spcl.c_type == TS_BITS)
+               blks = spcl.c_count;
+       else {
+               if (spcl.c_type != TS_END) {
+                       for (i = 0; i < spcl.c_count; i++)
+                               if (spcl.c_addr[i] != 0)
+                                       blks++;
+               }
        }
        slp->count = lastspclrec + blks + 1 - spcl.c_tapea;
        slp->tapea = spcl.c_tapea;
        }
        slp->count = lastspclrec + blks + 1 - spcl.c_tapea;
        slp->tapea = spcl.c_tapea;