mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-07-02 19:22:47 -05:00
Fix dereference after null check, CID 1570976
This commit is contained in:

committed by
Michał Trojnara

parent
6d6270094e
commit
6f4e9ab597
@ -3653,11 +3653,13 @@ static int use_legacy(void)
|
|||||||
|
|
||||||
static int file_exists(const char *filename)
|
static int file_exists(const char *filename)
|
||||||
{
|
{
|
||||||
|
if (filename) {
|
||||||
FILE *file = fopen(filename, "rb");
|
FILE *file = fopen(filename, "rb");
|
||||||
if (file) {
|
if (file) {
|
||||||
fclose(file);
|
fclose(file);
|
||||||
return 1; /* File exists */
|
return 1; /* File exists */
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return 0; /* File does not exist */
|
return 0; /* File does not exist */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user