From 66ed01062e37411a4c6fe8a7d1a83325f5ecacc1 Mon Sep 17 00:00:00 2001 From: Mads Kiilerich Date: Fri, 30 Mar 2012 21:37:30 +0200 Subject: [PATCH 1/2] cache: fix off-by-one-of-the-wrong-kind in BITMAP_CACHE_WAITING_LIST_INDEX handling --- libfreerdp-cache/bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfreerdp-cache/bitmap.c b/libfreerdp-cache/bitmap.c index e3e2303fa..a382bfe0c 100644 --- a/libfreerdp-cache/bitmap.c +++ b/libfreerdp-cache/bitmap.c @@ -258,7 +258,7 @@ rdpBitmapCache* bitmap_cache_new(rdpSettings* settings) { bitmap_cache->cells[i].number = settings->bitmapCacheV2CellInfo[i].numEntries; /* allocate an extra entry for BITMAP_CACHE_WAITING_LIST_INDEX */ - bitmap_cache->cells[i].entries = (rdpBitmap**) xzalloc(sizeof(rdpBitmap*) * bitmap_cache->cells[i].number + 1); + bitmap_cache->cells[i].entries = (rdpBitmap**) xzalloc(sizeof(rdpBitmap*) * (bitmap_cache->cells[i].number + 1)); } } From 704ff7d01ba74641743c654295641870aceee9b1 Mon Sep 17 00:00:00 2001 From: Mads Kiilerich Date: Fri, 30 Mar 2012 21:37:39 +0200 Subject: [PATCH 2/2] core: use valid default values for Client Core Data keyboardType and keyboardFunctionKey --- libfreerdp-core/settings.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libfreerdp-core/settings.c b/libfreerdp-core/settings.c index 8f5a40ad5..17c82c651 100644 --- a/libfreerdp-core/settings.c +++ b/libfreerdp-core/settings.c @@ -53,9 +53,9 @@ rdpSettings* settings_new(void* instance) settings->tls_security = true; settings->rdp_security = true; settings->client_build = 2600; - settings->kbd_type = 0; + settings->kbd_type = 4; /* @msdn{cc240510} 'IBM enhanced (101- or 102-key) keyboard' */ settings->kbd_subtype = 0; - settings->kbd_fn_keys = 0; + settings->kbd_fn_keys = 12; settings->kbd_layout = 0; settings->encryption = false; settings->salted_checksum = true;