aleitner commented on code in PR #395:
URL: https://github.com/apache/guacamole-server/pull/395#discussion_r995957402


##########
src/terminal/terminal.c:
##########
@@ -2165,11 +2166,21 @@ void guac_terminal_clipboard_reset(guac_terminal* 
terminal,
 
 void guac_terminal_clipboard_append(guac_terminal* terminal,
         const char* data, int length) {
-    guac_common_clipboard_append(terminal->clipboard, data, length);
+
+    /* Allocate and clear space for the converted data */
+    char output_data[GUAC_COMMON_CLIPBOARD_MAX_LENGTH];
+    memset(output_data, '\0', GUAC_COMMON_CLIPBOARD_MAX_LENGTH);

Review Comment:
   I completely overlooked that the pointer gets incremented. Thanks!



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to