Prevent the use of an unitialized variable for block size in CRC calculation.
This commit is contained in:
parent
4206784d82
commit
cf95efbad1
@ -938,7 +938,7 @@ set_crc(ARCHD *arcn, int fd)
|
|||||||
int i;
|
int i;
|
||||||
int res;
|
int res;
|
||||||
off_t cpcnt = 0L;
|
off_t cpcnt = 0L;
|
||||||
u_long size;
|
u_long size = FILEBLK;
|
||||||
unsigned long crc = 0L;
|
unsigned long crc = 0L;
|
||||||
char tbuf[FILEBLK];
|
char tbuf[FILEBLK];
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
@ -951,12 +951,6 @@ set_crc(ARCHD *arcn, int fd)
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* not in minix */
|
|
||||||
if ((size = (u_long)arcn->sb.st_blksize) > (u_long)sizeof(tbuf))
|
|
||||||
size = (u_long)sizeof(tbuf);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* read all the bytes we think that there are in the file. If the user
|
* read all the bytes we think that there are in the file. If the user
|
||||||
* is trying to archive an active file, forget this file.
|
* is trying to archive an active file, forget this file.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user