GUAC-1171: Ensure directory names are null-terminated.
This commit is contained in:
parent
1316743b02
commit
4d941545cd
@ -552,7 +552,7 @@ static int guac_common_ssh_sftp_get_handler(guac_client* client,
|
|||||||
list_state->directory = dir;
|
list_state->directory = dir;
|
||||||
list_state->sftp_data = sftp_data;
|
list_state->sftp_data = sftp_data;
|
||||||
strncpy(list_state->directory_name, name,
|
strncpy(list_state->directory_name, name,
|
||||||
sizeof(list_state->directory_name));
|
sizeof(list_state->directory_name) - 1);
|
||||||
|
|
||||||
/* Allocate stream for body */
|
/* Allocate stream for body */
|
||||||
guac_stream* stream = guac_client_alloc_stream(client);
|
guac_stream* stream = guac_client_alloc_stream(client);
|
||||||
|
@ -486,7 +486,7 @@ int guac_rdp_download_get_handler(guac_client* client, guac_object* object,
|
|||||||
rdp_stream->ls_status.fs = fs;
|
rdp_stream->ls_status.fs = fs;
|
||||||
rdp_stream->ls_status.file_id = file_id;
|
rdp_stream->ls_status.file_id = file_id;
|
||||||
strncpy(rdp_stream->ls_status.directory_name, name,
|
strncpy(rdp_stream->ls_status.directory_name, name,
|
||||||
sizeof(rdp_stream->ls_status.directory_name));
|
sizeof(rdp_stream->ls_status.directory_name) - 1);
|
||||||
|
|
||||||
/* Allocate stream for body */
|
/* Allocate stream for body */
|
||||||
guac_stream* stream = guac_client_alloc_stream(client);
|
guac_stream* stream = guac_client_alloc_stream(client);
|
||||||
|
Loading…
Reference in New Issue
Block a user