GUACAMOLE-502: Merge cessastion of name instruction in RDP/VNC to avoid incorreclty updating window title.
diff --git a/configure.ac b/configure.ac
index 8ae0743..42e8197 100644
--- a/configure.ac
+++ b/configure.ac
@@ -419,7 +419,7 @@
if test "x$with_terminal" != "xno"
then
have_terminal=yes
- if test "x${have_pango}" = "xno"
+ if test "x${have_pango}" != "xyes"
then
have_terminal=no
fi
diff --git a/src/guacenc/encode.c b/src/guacenc/encode.c
index 854c5c6..2d74a9b 100644
--- a/src/guacenc/encode.c
+++ b/src/guacenc/encode.c
@@ -63,8 +63,11 @@
/* Continuously read and handle all instructions */
while (!guac_parser_read(parser, socket, -1)) {
- guacenc_handle_instruction(display, parser->opcode,
- parser->argc, parser->argv);
+ if (guacenc_handle_instruction(display, parser->opcode,
+ parser->argc, parser->argv)) {
+ guac_parser_free(parser);
+ return 1;
+ }
}
/* Fail on read/parse error */
diff --git a/src/guacenc/video.c b/src/guacenc/video.c
index 4ca84f6..4592a2b 100644
--- a/src/guacenc/video.c
+++ b/src/guacenc/video.c
@@ -228,7 +228,11 @@
/* Flush frames to bring timeline in sync, duplicating if necessary */
do {
- guacenc_video_flush_frame(video);
+ if (guacenc_video_flush_frame(video)) {
+ guacenc_log(GUAC_LOG_ERROR, "Unable to flush frame to video "
+ "stream.");
+ return 1;
+ }
} while (--elapsed != 0);
}
diff --git a/src/libguac/socket-fd.c b/src/libguac/socket-fd.c
index e9cce0f..3489852 100644
--- a/src/libguac/socket-fd.c
+++ b/src/libguac/socket-fd.c
@@ -102,10 +102,10 @@
#ifdef ENABLE_WINSOCK
/* WSA only works with send() */
- retval = send(data->fd, buf, count, 0);
+ retval = send(data->fd, buffer, count, 0);
#else
/* Use write() for all other platforms */
- retval = write(data->fd, buf, count);
+ retval = write(data->fd, buffer, count);
#endif
/* Record errors in guac_error */
@@ -115,7 +115,7 @@
return retval;
}
- /* Advance buffer as data retval */
+ /* Advance buffer to next chunk */
buffer += retval;
count -= retval;
diff --git a/src/terminal/typescript.c b/src/terminal/typescript.c
index 69c8a1d..2333845 100644
--- a/src/terminal/typescript.c
+++ b/src/terminal/typescript.c
@@ -130,8 +130,13 @@
}
/* Append suffix to basename */
- sprintf(typescript->timing_filename, "%s.%s", typescript->data_filename,
- GUAC_TERMINAL_TYPESCRIPT_TIMING_SUFFIX);
+ if (snprintf(typescript->timing_filename, sizeof(typescript->timing_filename),
+ "%s.%s", typescript->data_filename, GUAC_TERMINAL_TYPESCRIPT_TIMING_SUFFIX)
+ >= sizeof(typescript->timing_filename)) {
+ close(typescript->data_fd);
+ free(typescript);
+ return NULL;
+ }
/* Attempt to open typescript timing file */
typescript->timing_fd = open(typescript->timing_filename,