summaryrefslogtreecommitdiffstats
path: root/libxrdp/xrdp_bitmap_compress.c
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2016-12-14 23:55:13 -0800
committerJay Sorg <jay.sorg@gmail.com>2016-12-14 23:55:13 -0800
commit492116d535173eeb7c8008f6687cd82ee60165f4 (patch)
tree3f5d03b98d9d4e3f6e09d69bd20cce26d3b73c1b /libxrdp/xrdp_bitmap_compress.c
parent4462d22bf16f17a1561b529a5970cbf93d4a9458 (diff)
downloadxrdp-proprietary-492116d535173eeb7c8008f6687cd82ee60165f4.tar.gz
xrdp-proprietary-492116d535173eeb7c8008f6687cd82ee60165f4.zip
fixes for rle bitmap compress limits and raw bitmaps
Diffstat (limited to 'libxrdp/xrdp_bitmap_compress.c')
-rw-r--r--libxrdp/xrdp_bitmap_compress.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libxrdp/xrdp_bitmap_compress.c b/libxrdp/xrdp_bitmap_compress.c
index 03c56f10..56898776 100644
--- a/libxrdp/xrdp_bitmap_compress.c
+++ b/libxrdp/xrdp_bitmap_compress.c
@@ -22,6 +22,8 @@
#include "libxrdp.h"
+#define BC_MAX_BYTES (16 * 1024)
+
/*****************************************************************************/
#define IN_PIXEL8(in_ptr, in_x, in_y, in_w, in_last_pixel, in_pixel); \
do { \
@@ -695,7 +697,7 @@ xrdp_bitmap_compress(char *in_data, int width, int height,
out_count = end;
line = in_data + width * start_line;
- while (start_line >= 0 && out_count < 32768)
+ while (start_line >= 0 && out_count <= BC_MAX_BYTES)
{
i = (s->p - s->data) + count;
@@ -987,7 +989,7 @@ xrdp_bitmap_compress(char *in_data, int width, int height,
out_count = end * 2;
line = in_data + width * start_line * 2;
- while (start_line >= 0 && out_count < 32768)
+ while (start_line >= 0 && out_count <= BC_MAX_BYTES)
{
i = (s->p - s->data) + count * 2;
@@ -1279,7 +1281,7 @@ xrdp_bitmap_compress(char *in_data, int width, int height,
out_count = end * 3;
line = in_data + width * start_line * 4;
- while (start_line >= 0 && out_count < 32768)
+ while (start_line >= 0 && out_count <= BC_MAX_BYTES)
{
i = (s->p - s->data) + count * 3;