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-unsubscr...@guacamole.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org