diff --git a/cache.c b/cache.c index 0b7d9ad..67230c6 100644 --- a/cache.c +++ b/cache.c @@ -39,7 +39,7 @@ cache_remove_lru_bitmap(uint8 cache_id) { int i; uint16 cache_idx = 0; - uint32 m = -1; + uint32 m = (uint32)-1; BMPCACHEENTRY *pbce; for (i = 0; i < NUM_ELEMENTS(g_bmpcache[cache_id]); i++) diff --git a/constants.h b/constants.h index cc08840..5bba627 100644 --- a/constants.h +++ b/constants.h @@ -242,7 +242,7 @@ enum RDP_INPUT_DEVICE #define RDP_CAPSET_BMPCACHE2 19 #define RDP_CAPLEN_BMPCACHE2 0x28 -#define BMPCACHE2_FLAG_PERSIST (1<<31) +#define BMPCACHE2_FLAG_PERSIST ((uint32)1<<31) #define RDP_SOURCE "MSTSC" diff --git a/orders.c b/orders.c index 1f96157..cdcdc81 100644 --- a/orders.c +++ b/orders.c @@ -879,16 +879,16 @@ process_secondary_order(STREAM s) /* The length isn't calculated correctly by the server. * For very compact orders the length becomes negative * so a signed integer must be used. */ - sint16 length; + uint16 length; uint16 flags; uint8 type; uint8 *next_order; - in_uint16_le(s, (uint16) length); + in_uint16_le(s, length); in_uint16_le(s, flags); /* used by bmpcache2 */ in_uint8(s, type); - next_order = s->p + length + 7; + next_order = s->p + (sint16)length + 7; switch (type) {