From: Stelian Pop Date: Mon, 22 Nov 2004 10:32:31 +0000 (+0000) Subject: Fix SIGSEGV in dump when dumping huge 2TB filesystems (bad inode map calculation) X-Git-Tag: release_0_4b38~7 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=241ddca30657af0cb9dbc60685712d7a4989ee49;p=dump.git Fix SIGSEGV in dump when dumping huge 2TB filesystems (bad inode map calculation) --- diff --git a/CHANGES b/CHANGES index 3a2b9b7..5ae2f0a 100644 --- 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 ????????????) ================================================================== @@ -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'. +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 for + submitting the bug and testing the fix. + Changes between versions 0.4b36 and 0.4b37 (released July 7, 2004) ================================================================== diff --git a/THANKS b/THANKS index ca207bd..98a98e3 100644 --- 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. @@ -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 +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 diff --git a/dump/tape.c b/dump/tape.c index 2df4d1e..6f829f8 100644 --- a/dump/tape.c +++ b/dump/tape.c @@ -37,7 +37,7 @@ #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 @@ -475,10 +475,14 @@ flushtape(void) } 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;