summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libxrdp/xrdp_caps.c5
-rw-r--r--libxrdp/xrdp_iso.c7
-rw-r--r--libxrdp/xrdp_orders.c14
-rw-r--r--sesman/sig.c6
-rw-r--r--tests/tcp_proxy/main.c10
-rw-r--r--xrdp/xrdp.c12
-rw-r--r--xrdp/xrdp_mm.c7
-rw-r--r--xrdp/xrdp_painter.c2
8 files changed, 33 insertions, 30 deletions
diff --git a/libxrdp/xrdp_caps.c b/libxrdp/xrdp_caps.c
index 300704c6..8a57c003 100644
--- a/libxrdp/xrdp_caps.c
+++ b/libxrdp/xrdp_caps.c
@@ -550,6 +550,11 @@ xrdp_caps_process_confirm_active(struct xrdp_rdp *self, struct stream *s)
in_uint16_le(s, num_caps);
in_uint8s(s, 2); /* pad */
+ if ((cap_len < 0) || (cap_len > 1024 * 1024))
+ {
+ return 1;
+ }
+
for (index = 0; index < num_caps; index++)
{
p = s->p;
diff --git a/libxrdp/xrdp_iso.c b/libxrdp/xrdp_iso.c
index 8369226c..ce3baf70 100644
--- a/libxrdp/xrdp_iso.c
+++ b/libxrdp/xrdp_iso.c
@@ -355,11 +355,18 @@ xrdp_iso_incoming(struct xrdp_iso *self)
{
text[cookie_index] = cc_type;
cookie_index++;
+ if (cookie_index > 255)
+ {
+ cookie_index = 255;
+ }
if ((s->p[0] == 0x0D) && (s->p[1] == 0x0A))
{
in_uint8s(s, 2);
text[cookie_index] = 0;
cookie_index = 0;
+ if (g_strlen(text) > 0)
+ {
+ }
break;
}
in_uint8(s, cc_type);
diff --git a/libxrdp/xrdp_orders.c b/libxrdp/xrdp_orders.c
index b2f1e582..d7a2d017 100644
--- a/libxrdp/xrdp_orders.c
+++ b/libxrdp/xrdp_orders.c
@@ -2641,6 +2641,7 @@ height(%d)", lines_sending, height);
return 0;
}
+#if defined(XRDP_JPEG)
/*****************************************************************************/
static int
xrdp_orders_send_as_jpeg(struct xrdp_orders *self,
@@ -2663,6 +2664,7 @@ xrdp_orders_send_as_jpeg(struct xrdp_orders *self,
return 1;
}
+#endif
#if defined(XRDP_NEUTRINORDP)
/*****************************************************************************/
@@ -2693,6 +2695,7 @@ xrdp_orders_send_as_rfx(struct xrdp_orders *self,
}
#endif
+#if defined(XRDP_JPEG) || defined(XRDP_NEUTRINORDP)
/*****************************************************************************/
static int APP_CC
xrdp_orders_out_v3(struct xrdp_orders *self, int cache_id, int cache_idx,
@@ -2733,6 +2736,7 @@ xrdp_orders_out_v3(struct xrdp_orders *self, int cache_id, int cache_idx,
out_uint8a(self->out_s, buf, bufsize);
return 0;
}
+#endif
/*****************************************************************************/
/* secondary drawing order (bitmap v3) using remotefx compression */
@@ -2741,12 +2745,16 @@ xrdp_orders_send_bitmap3(struct xrdp_orders *self,
int width, int height, int bpp, char *data,
int cache_id, int cache_idx, int hints)
{
- int e;
+ struct xrdp_client_info *ci;
+#if defined(XRDP_JPEG) || defined(XRDP_NEUTRINORDP)
int bufsize;
- int quality;
struct stream *xr_s; /* xrdp stream */
+#endif
+#if defined(XRDP_JPEG)
+ int e;
+ int quality;
struct stream *temp_s; /* xrdp stream */
- struct xrdp_client_info *ci;
+#endif
#if defined(XRDP_NEUTRINORDP)
STREAM *fr_s; /* FreeRDP stream */
RFX_CONTEXT *context;
diff --git a/sesman/sig.c b/sesman/sig.c
index d881515b..b10be5fb 100644
--- a/sesman/sig.c
+++ b/sesman/sig.c
@@ -158,7 +158,6 @@ sig_handler_thread(void *arg)
sigaddset(&waitmask, SIGHUP);
sigaddset(&waitmask, SIGCHLD);
sigaddset(&waitmask, SIGTERM);
- sigaddset(&waitmask, SIGKILL);
sigaddset(&waitmask, SIGINT);
// sigaddset(&waitmask, SIGFPE);
@@ -188,11 +187,6 @@ sig_handler_thread(void *arg)
LOG_DBG("sesman received SIGINT", 0);
sig_sesman_shutdown(recv_signal);
break;
- case SIGKILL:
- /* we die */
- LOG_DBG("sesman received SIGKILL", 0);
- sig_sesman_shutdown(recv_signal);
- break;
case SIGTERM:
/* we die */
LOG_DBG("sesman received SIGTERM", 0);
diff --git a/tests/tcp_proxy/main.c b/tests/tcp_proxy/main.c
index 1cc58889..26c974cd 100644
--- a/tests/tcp_proxy/main.c
+++ b/tests/tcp_proxy/main.c
@@ -26,7 +26,7 @@
#include <errno.h>
#include <locale.h>
#include <netdb.h>
-#include <sys/types.h>
+#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@@ -399,13 +399,6 @@ g_signal_user_interrupt(void (*func)(int))
/*****************************************************************************/
static void APP_CC
-g_signal_kill(void (*func)(int))
-{
- signal(SIGKILL, func);
-}
-
-/*****************************************************************************/
-static void APP_CC
g_signal_terminate(void (*func)(int))
{
signal(SIGTERM, func);
@@ -685,7 +678,6 @@ main(int argc, char **argv)
g_init("tcp_proxy");
g_signal_user_interrupt(proxy_shutdown); /* SIGINT */
- g_signal_kill(proxy_shutdown); /* SIGKILL */
g_signal_usr1(clear_counters); /* SIGUSR1 */
g_signal_terminate(proxy_shutdown); /* SIGTERM */
diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c
index 414e079b..88743cc6 100644
--- a/xrdp/xrdp.c
+++ b/xrdp/xrdp.c
@@ -385,7 +385,7 @@ main(int argc, char **argv)
{
g_writeln("Unknown Parameter");
g_writeln("xrdp -h for help");
- g_writeln("");
+ g_writeln("%s", "");
g_deinit();
g_exit(0);
}
@@ -395,30 +395,30 @@ main(int argc, char **argv)
if (startup_params->help)
{
- g_writeln("");
+ g_writeln("%s", "");
g_writeln("xrdp: A Remote Desktop Protocol server.");
g_writeln("Copyright (C) Jay Sorg 2004-2014");
g_writeln("See http://www.xrdp.org for more information.");
- g_writeln("");
+ g_writeln("%s", "");
g_writeln("Usage: xrdp [options]");
g_writeln(" --help: show help");
g_writeln(" --nodaemon: don't fork into background");
g_writeln(" --kill: shut down xrdp");
g_writeln(" --port: tcp listen port");
g_writeln(" --fork: fork on new connection");
- g_writeln("");
+ g_writeln("%s", "");
g_deinit();
g_exit(0);
}
if (startup_params->version)
{
- g_writeln("");
+ g_writeln("%s", "");
g_writeln("xrdp: A Remote Desktop Protocol server.");
g_writeln("Copyright (C) Jay Sorg 2004-2014");
g_writeln("See http://www.xrdp.org for more information.");
g_writeln("Version %s", PACKAGE_VERSION);
- g_writeln("");
+ g_writeln("%s", "");
g_deinit();
g_exit(0);
}
diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c
index 1e1c34c1..1ee0b3bc 100644
--- a/xrdp/xrdp_mm.c
+++ b/xrdp/xrdp_mm.c
@@ -817,6 +817,7 @@ xrdp_mm_process_rail_create_window(struct xrdp_mm* self, struct stream* s)
return rv;
}
+#if 0
/*****************************************************************************/
/* returns error
process rail configure window order */
@@ -883,6 +884,7 @@ xrdp_mm_process_rail_configure_window(struct xrdp_mm* self, struct stream* s)
g_free(rwso.visibility_rects);
return rv;
}
+#endif
/*****************************************************************************/
/* returns error
@@ -1056,7 +1058,6 @@ xrdp_mm_chan_data_in(struct trans *trans)
{
struct xrdp_mm *self;
struct stream *s;
- int id;
int size;
int error;
@@ -1073,7 +1074,7 @@ xrdp_mm_chan_data_in(struct trans *trans)
return 1;
}
- in_uint32_le(s, id);
+ in_uint8s(s, 4); /* id */
in_uint32_le(s, size);
error = trans_force_read(trans, size - 8);
@@ -2929,7 +2930,6 @@ int read_allowed_channel_names(struct list *names, struct list *values)
int fd;
int ret = 0;
char cfg_file[256];
- int pos;
g_snprintf(cfg_file, 255, "%s/xrdp.ini", XRDP_CFG_PATH);
fd = g_file_open(cfg_file);
@@ -2938,7 +2938,6 @@ int read_allowed_channel_names(struct list *names, struct list *values)
{
names->auto_free = 1;
values->auto_free = 1;
- pos = 0;
/* all values in this section can be valid channel names */
if (file_read_section(fd, "channels", names, values) == 0)
diff --git a/xrdp/xrdp_painter.c b/xrdp/xrdp_painter.c
index e47f36ed..522c83d5 100644
--- a/xrdp/xrdp_painter.c
+++ b/xrdp/xrdp_painter.c
@@ -915,7 +915,6 @@ xrdp_painter_composite(struct xrdp_painter* self,
int k;
int dx;
int dy;
- int palette_id;
int cache_srcidx;
int cache_mskidx;
@@ -939,7 +938,6 @@ xrdp_painter_composite(struct xrdp_painter* self,
dstx += dx;
dsty += dy;
- palette_id = 0;
cache_srcidx = src->item_index;
cache_mskidx = -1;
if (mskflags & 1)