You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by "mike-jumper (via GitHub)" <gi...@apache.org> on 2025/01/21 17:40:02 UTC
Re: [PR] GUACAMOLE-2002: Allow connection clipboard limits to be configured. [guacamole-server]
mike-jumper commented on code in PR #564:
URL: https://github.com/apache/guacamole-server/pull/564#discussion_r1924128125
##########
src/protocols/rdp/channels/cliprdr.h:
##########
@@ -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);
Review Comment:
Please document the parameters.
##########
src/protocols/vnc/clipboard.c:
##########
@@ -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;
Review Comment:
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org