use calloc instead of malloc, to make sure block is initialized to 0
This commit is contained in:
parent
5c7325e0de
commit
a22bbe847f
2 changed files with 2 additions and 1 deletions
|
@ -116,6 +116,7 @@ extern FILE *fftemp();
|
|||
extern long atol();
|
||||
extern char *mktemp();
|
||||
extern char *malloc();
|
||||
extern char *calloc();
|
||||
extern char *getenv();
|
||||
extern char *strncpy();
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ small(fitsmall, gain)
|
|||
return(0);
|
||||
}
|
||||
if (pbittab[bitindex] == 0 && pass == PASS_1) {
|
||||
if ((pbittab[bitindex] = malloc(MEMINCR)) == 0) {
|
||||
if ((pbittab[bitindex] = calloc(MEMINCR, 1)) == 0) {
|
||||
static int w2_given;
|
||||
|
||||
if (!w2_given) {
|
||||
|
|
Loading…
Reference in a new issue