Bugfix: when freerdp_assistance_parse_file_buffer was called from external code, it did not copy the access password to the rdpAssistanceFile struct. (#6550)

* Fixed bug with assistance buffer parsing: `freerdp_assistance_parse_file_buffer` may be called directly, not necessarily from `freerdp_assistance_parse_file`, so password should be saved to the `rdpAssistanceFile` in `freerdp_assistance_parse_file_buffer`.
This commit is contained in:
odednoam 2020-11-09 10:19:53 +02:00 committed by GitHub
parent c5f746d71a
commit 88102275f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -790,6 +790,10 @@ int freerdp_assistance_parse_file_buffer(rdpAssistanceFile* file, const char* bu
char* r;
int status;
size_t length;
free(file->password);
file->password = _strdup(password);
p = strstr(buffer, "UPLOADINFO");
if (p)
@ -1172,9 +1176,7 @@ int freerdp_assistance_parse_file(rdpAssistanceFile* file, const char* name, con
}
free(file->filename);
free(file->password);
file->filename = _strdup(name);
file->password = _strdup(password);
fp = fopen(name, "r");
if (!fp)