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:
parent
c5f746d71a
commit
88102275f0
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user