fix: ensure variables are initialized before dereferencing

This commit is contained in:
Stéphane Lesimple
2020-09-05 17:34:15 +02:00
parent 9ba1374351
commit daec1295aa
2 changed files with 2 additions and 2 deletions

View File

@@ -466,7 +466,7 @@ GlobalClosure *Closure;
int exitCode = EXIT_SUCCESS;
void InitClosure()
{ int v1,v2,v3,dots=0;
{ int v1=0,v2=0,v3=0,dots=0;
char *v,version[strlen(VERSION)+1];
Closure = g_malloc0(sizeof(GlobalClosure));

View File

@@ -1837,7 +1837,7 @@ reread:
err = CheckForMissingSector(rc->buf+i*2048, b, NULL, 0);
if(err != SECTOR_PRESENT)
{ int fixme;
{ int fixme=0;
ExplainMissingSector(rc->buf+i*2048, b, err, SOURCE_MEDIUM, &fixme);
if(rc->map) /* Avoids confusion in the ecc stage */