diff options
author | jsorg71 <jsorg71> | 2006-05-02 23:36:01 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2006-05-02 23:36:01 +0000 |
commit | bff658c96bdd7cf0986995ef262f363f4320e681 (patch) | |
tree | 0712311e2aeca9589a3d09ae75f1cc8c6d2a247f | |
parent | 770a27bfb39a64cb742f73156cfb1071fe8fd603 (diff) | |
download | xrdp-proprietary-bff658c96bdd7cf0986995ef262f363f4320e681.tar.gz xrdp-proprietary-bff658c96bdd7cf0986995ef262f363f4320e681.zip |
fix for large clip data
-rw-r--r-- | vnc/vnc.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -616,6 +616,7 @@ lib_clip_data(struct vnc* v) struct stream* s; int size; int error; + int temp; make_stream(s); init_stream(s, 8192); @@ -624,8 +625,17 @@ lib_clip_data(struct vnc* v) { in_uint8s(s, 3); in_uint32_be(s, size); - init_stream(s, 8192); - error = lib_recv(v, s->data, size); + while (size > 0 && error == 0) + { + init_stream(s, 8192); + temp = size; + if (temp > 8192) + { + temp = 8192; + } + error = lib_recv(v, s->data, temp); + size -= temp; + } } free_stream(s); return error; |