mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
Fixed coverity issue 1047623
This commit is contained in:
@@ -456,7 +456,10 @@ BOOL freerdp_client_parse_rdp_file(rdpFile* file, const char* name)
|
||||
fseek(fp, 0, SEEK_SET);
|
||||
|
||||
if (file_size < 1)
|
||||
{
|
||||
fclose(fp);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
buffer = (BYTE*) malloc(file_size + 2);
|
||||
read_size = fread(buffer, file_size, 1, fp);
|
||||
@@ -466,6 +469,7 @@ BOOL freerdp_client_parse_rdp_file(rdpFile* file, const char* name)
|
||||
if (!ferror(fp))
|
||||
read_size = file_size;
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
if (read_size < 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user