diff --git a/include/freerdp/update.h b/include/freerdp/update.h index 55f071cf1..05b84611f 100644 --- a/include/freerdp/update.h +++ b/include/freerdp/update.h @@ -567,8 +567,8 @@ typedef struct _CACHE_COLOR_TABLE_ORDER CACHE_COLOR_TABLE_ORDER; struct _GLYPH_DATA { uint16 cacheIndex; - uint16 x; - uint16 y; + sint16 x; + sint16 y; uint16 cx; uint16 cy; uint16 cb; diff --git a/libfreerdp-core/orders.c b/libfreerdp-core/orders.c index 9e06be24e..225a336fd 100644 --- a/libfreerdp-core/orders.c +++ b/libfreerdp-core/orders.c @@ -1155,6 +1155,7 @@ void update_read_fast_index_order(STREAM* s, ORDER_INFO* orderInfo, FAST_INDEX_O stream_read_uint8(s, cbData); stream_get_mark(s, mark); + mark += cbData; if ((fast_index->ulCharInc == 0) && !(fast_index->flAccel & SO_CHAR_INC_EQUAL_BM_BASE)) delta = True; @@ -1487,12 +1488,15 @@ void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_ord stream_read_uint16(s, glyph->cy); glyph->cb = ((glyph->cx + 7) / 8) * glyph->cy; - glyph->cb += glyph->cb % 4; + glyph->cb += ((glyph->cb % 4) > 0) ? 4 - (glyph->cb % 4) : 0; glyph->aj = (uint8*) xmalloc(glyph->cb); stream_read(s, glyph->aj, glyph->cb); } + + if (flags & CG_GLYPH_UNICODE_PRESENT) + stream_seek(s, cache_glyph_order->cGlyphs * 2); } void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order, uint16 flags) diff --git a/libfreerdp-core/orders.h b/libfreerdp-core/orders.h index 92d12e640..c7462c050 100644 --- a/libfreerdp-core/orders.h +++ b/libfreerdp-core/orders.h @@ -197,6 +197,8 @@ #define ORDER_TYPE_COMPDESK_FIRST 0x0C #define ORDER_TYPE_FRAME_MARKER 0x0D +#define CG_GLYPH_UNICODE_PRESENT 0x0010 + void update_recv_order(rdpUpdate* update, STREAM* s); void update_read_dstblt_order(STREAM* s, ORDER_INFO* orderInfo, DSTBLT_ORDER* dstblt);