mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-04-04 17:00:11 -05:00
Fix dereference after null check, CID 1570976
This commit is contained in:
parent
6d6270094e
commit
6f4e9ab597
@ -3653,10 +3653,12 @@ static int use_legacy(void)
|
||||
|
||||
static int file_exists(const char *filename)
|
||||
{
|
||||
FILE *file = fopen(filename, "rb");
|
||||
if (file) {
|
||||
fclose(file);
|
||||
return 1; /* File exists */
|
||||
if (filename) {
|
||||
FILE *file = fopen(filename, "rb");
|
||||
if (file) {
|
||||
fclose(file);
|
||||
return 1; /* File exists */
|
||||
}
|
||||
}
|
||||
return 0; /* File does not exist */
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user