diff --git a/include/freerdp/primary.h b/include/freerdp/primary.h index c2e58fc19..5fe370f98 100644 --- a/include/freerdp/primary.h +++ b/include/freerdp/primary.h @@ -308,7 +308,7 @@ struct _GLYPH_INDEX_ORDER sint32 x; sint32 y; uint32 cbData; - uint8* data; + uint8 data[256]; }; typedef struct _GLYPH_INDEX_ORDER GLYPH_INDEX_ORDER; diff --git a/libfreerdp-cache/glyph.c b/libfreerdp-cache/glyph.c index 2f40bb55d..ade5154ac 100644 --- a/libfreerdp-cache/glyph.c +++ b/libfreerdp-cache/glyph.c @@ -168,7 +168,16 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len void update_gdi_glyph_index(rdpContext* context, GLYPH_INDEX_ORDER* glyph_index) { + rdpGlyphCache* glyph_cache; + glyph_cache = context->cache->glyph; + update_process_glyph_fragments(context, glyph_index->data, glyph_index->cbData, + glyph_index->cacheId, glyph_index->ulCharInc, glyph_index->flAccel, + glyph_index->backColor, glyph_index->foreColor, glyph_index->x, glyph_index->y, + glyph_index->bkLeft, glyph_index->bkTop, + glyph_index->bkRight - glyph_index->bkLeft, glyph_index->bkBottom - glyph_index->bkTop, + glyph_index->opLeft, glyph_index->opTop, + glyph_index->opRight - glyph_index->opLeft, glyph_index->opBottom - glyph_index->opTop); } void update_gdi_fast_index(rdpContext* context, FAST_INDEX_ORDER* fast_index) @@ -265,7 +274,8 @@ void glyph_cache_put(rdpGlyphCache* glyph_cache, uint32 id, uint32 index, rdpGly if (prevGlyph != NULL) { xfree(prevGlyph->aj); - Glyph_Free(glyph_cache->context, prevGlyph); + /* hack jsorg71 */ + //Glyph_Free(glyph_cache->context, prevGlyph); xfree(prevGlyph); } diff --git a/libfreerdp-core/capabilities.c b/libfreerdp-core/capabilities.c index 08d61a91f..05a86c707 100644 --- a/libfreerdp-core/capabilities.c +++ b/libfreerdp-core/capabilities.c @@ -330,6 +330,11 @@ void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings) stream_write_uint16(s, 1); /* maximumOrderLevel (2 bytes) */ stream_write_uint16(s, 0); /* numberFonts (2 bytes) */ stream_write_uint16(s, orderFlags); /* orderFlags (2 bytes) */ + + /* hack jsorg71 */ + settings->order_support[NEG_FAST_INDEX_INDEX] = 0; + settings->order_support[NEG_FAST_GLYPH_INDEX] = 0; + stream_write(s, settings->order_support, 32); /* orderSupport (32 bytes) */ stream_write_uint16(s, 0); /* textFlags (2 bytes) */ stream_write_uint16(s, orderSupportExFlags); /* orderSupportExFlags (2 bytes) */ diff --git a/libfreerdp-core/orders.c b/libfreerdp-core/orders.c index 0aba958a6..1aa57b4ce 100644 --- a/libfreerdp-core/orders.c +++ b/libfreerdp-core/orders.c @@ -929,7 +929,7 @@ void update_read_glyph_index_order(STREAM* s, ORDER_INFO* orderInfo, GLYPH_INDEX if (orderInfo->fieldFlags & ORDER_FIELD_22) { stream_read_uint8(s, glyph_index->cbData); - stream_get_mark(s, glyph_index->data); + memcpy(glyph_index->data, s->p, glyph_index->cbData); stream_seek(s, glyph_index->cbData); } }