#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.82 2004/03/08 14:04:04 stelian Exp $";
+ "$Id: tape.c,v 1.83 2004/04/21 09:15:08 stelian Exp $";
#endif /* not lint */
#include <config.h>
int compresult;
volatile int do_compress = !first;
unsigned long worklen;
-#ifdef HAVE_BZLIB
- unsigned int worklen2;
-#endif
#ifdef HAVE_LZO
lzo_align_t __LZO_MMODEL *LZO_WorkMem;
#endif
#endif /* HAVE_ZLIB */
#ifdef HAVE_BZLIB
if (zipflag == COMPRESS_BZLIB) {
- worklen2 = worklen;
+ unsigned int worklen2 = worklen;
compresult = BZ2_bzBuffToBuffCompress(
comp_buf->buf,
&worklen2,
#endif /* HAVE_BZLIB */
#ifdef HAVE_LZO
if (zipflag == COMPRESS_LZO) {
+ lzo_uint worklen2 = worklen;
compresult = lzo1x_1_compress((char *)slp->tblock[0],writesize,
comp_buf->buf,
- (lzo_uintp)&worklen,
+ &worklen2,
LZO_WorkMem);
+ worklen = worklen2;
if (compresult == LZO_E_OK)
compresult = 1;
else
#ifndef lint
static const char rcsid[] =
- "$Id: dirs.c,v 1.26 2004/04/13 13:04:33 stelian Exp $";
+ "$Id: dirs.c,v 1.27 2004/04/21 09:15:22 stelian Exp $";
#endif /* not lint */
#include <config.h>
i = DIRBLKSIZ - (loc & (DIRBLKSIZ - 1));
if ((dp->d_reclen & 0x3) != 0 ||
dp->d_reclen > i ||
- dp->d_reclen < DIRSIZ(0, dp) ||
- dp->d_namlen > MAXNAMLEN) {
+ dp->d_reclen < DIRSIZ(0, dp)
+#if MAXNAMLEN < 255
+ || dp->d_namlen > MAXNAMLEN
+#endif
+ ) {
Vprintf(stdout, "Mangled directory: ");
if ((dp->d_reclen & 0x3) != 0)
Vprintf(stdout,
Vprintf(stdout,
"reclen less than DIRSIZ (%d < %d) ",
dp->d_reclen, DIRSIZ(0, dp));
+#if MAXNAMLEN < 255
if (dp->d_namlen > MAXNAMLEN)
Vprintf(stdout,
"reclen name too big (%d > %d) ",
dp->d_namlen, MAXNAMLEN);
+#endif
Vprintf(stdout, "\n");
loc += i;
continue;
#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.79 2004/04/13 13:04:33 stelian Exp $";
+ "$Id: tape.c,v 1.80 2004/04/21 09:15:22 stelian Exp $";
#endif /* not lint */
#include <config.h>
/* zflag gets set in setup() from the dump header */
int cresult, blocklen;
unsigned long worklen;
-#ifdef HAVE_BZLIB
- unsigned int worklen2;
-#endif
char *output = NULL,*reason = NULL, *lengtherr = NULL;
/* build a length error message */
#ifndef HAVE_BZLIB
errx(1,"This restore version doesn't support bzlib decompression");
#else
- worklen2 = worklen;
+ unsigned int worklen2 = worklen;
cresult = BZ2_bzBuffToBuffDecompress(
comprbuf, &worklen2,
tpbin->buf, blocklen, 0, 0);
#ifndef HAVE_LZO
errx(1,"This restore version doesn't support lzo decompression");
#else
+ lzo_uint worklen2 = worklen;
cresult = lzo1x_decompress(tpbin->buf, blocklen,
- comprbuf, (lzo_uintp) &worklen,NULL);
+ comprbuf, &worklen2, NULL);
+ worklen = worklen2;
output = comprbuf;
switch (cresult) {
case LZO_E_OK: