-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GUACAMOLE-2002: Allow connection clipboard limits to be configured. #564
base: main
Are you sure you want to change the base?
GUACAMOLE-2002: Allow connection clipboard limits to be configured. #564
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be sure to amend your commit to end with a period!
223c554
to
544663c
Compare
544663c
to
a894101
Compare
@@ -75,7 +75,7 @@ typedef struct guac_rdp_clipboard { | |||
* A newly-allocated instance of guac_rdp_clipboard which has been | |||
* initialized for processing Guacamole clipboard data. | |||
*/ | |||
guac_rdp_clipboard* guac_rdp_clipboard_alloc(guac_client* client); | |||
guac_rdp_clipboard* guac_rdp_clipboard_alloc(guac_client* client, int buffer_size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please document the parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
src/protocols/vnc/clipboard.c
Outdated
@@ -103,20 +103,23 @@ int guac_vnc_clipboard_end_handler(guac_user* user, guac_stream* stream) { | |||
guac_vnc_client* vnc_client = (guac_vnc_client*) user->client->data; | |||
rfbClient* rfb_client = vnc_client->rfb_client; | |||
|
|||
char output_data[GUAC_COMMON_CLIPBOARD_MAX_LENGTH]; | |||
int output_buf_size = vnc_client->clipboard->available; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on timing, vnc_client->clipboard
might not have been allocated by guac_vnc_client_thread()
by the time guac_vnc_clipboard_end_handler()
is called for an inbound clipboard stream.
This may also be true for the other handlers for inbound instructions related to clipboard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Added NULL check to the VNC functions the same it is done for RDP
- Moved RDP and VNC clipboard allocation into user join handlers. So now it happens before the client threads start. I believe this is not necessary for terminal based protocols because I had not moved guac_common_clipboard_alloc originally.
544ac9f
to
32dbdfa
Compare
4ef5b32
to
5b070e5
Compare
5b070e5
to
44c1bd2
Compare
Jira Discussion