summaryrefslogtreecommitdiffstats
path: root/sesman
diff options
context:
space:
mode:
authorPavel Roskin <plroskin@gmail.com>2016-05-06 18:31:03 -0700
committerPavel Roskin <plroskin@gmail.com>2016-05-06 18:31:03 -0700
commit0dd0426e6fc34aebadfa575f12eaa4305d6eeb93 (patch)
tree0836a73e0b37c5e6c51ee37af378440df4ee14b2 /sesman
parente7e4d61265dc276535ef790bcbc5000a339e5d8f (diff)
downloadxrdp-proprietary-0dd0426e6fc34aebadfa575f12eaa4305d6eeb93.tar.gz
xrdp-proprietary-0dd0426e6fc34aebadfa575f12eaa4305d6eeb93.zip
Check XGetWindowProperty() return code in clipboard_event_property_notify()
Diffstat (limited to 'sesman')
-rw-r--r--sesman/chansrv/clipboard.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sesman/chansrv/clipboard.c b/sesman/chansrv/clipboard.c
index 80db95d1..5f01f241 100644
--- a/sesman/chansrv/clipboard.c
+++ b/sesman/chansrv/clipboard.c
@@ -2382,6 +2382,11 @@ clipboard_event_property_notify(XEvent *xevent)
AnyPropertyType, &actual_type_return, &actual_format_return,
&nitems_returned, &bytes_left, &data);
+ if (rv != Success)
+ {
+ return 1;
+ }
+
if (data != 0)
{
XFree(data);
@@ -2425,6 +2430,11 @@ clipboard_event_property_notify(XEvent *xevent)
AnyPropertyType, &actual_type_return, &actual_format_return,
&nitems_returned, &bytes_left, &data);
+ if (rv != Success)
+ {
+ return 1;
+ }
+
format_in_bytes = FORMAT_TO_BYTES(actual_format_return);
new_data_len = nitems_returned * format_in_bytes;
cptr = (char *) g_malloc(g_clip_s2c.total_bytes + new_data_len, 0);