Ticket #261: Handled NULL bitmaps in guac_rdp_bitmap_setsurface and guac_rdp_gdi_memblt functions.

This commit is contained in:
James Muehlner 2013-06-13 23:38:20 -07:00
parent 602e0045b6
commit 227afb3793
2 changed files with 13 additions and 0 deletions

View File

@ -183,6 +183,12 @@ void guac_rdp_bitmap_setsurface(rdpContext* context, rdpBitmap* bitmap, boolean
else { else {
/* Make sure that the recieved bitmap is not NULL before processing */
if (bitmap == NULL) {
guac_client_log_info(client, "NULL bitmap found in bitmap_setsurface instruction.");
return;
}
/* If not available as a surface, make available. */ /* If not available as a surface, make available. */
if (((guac_rdp_bitmap*) bitmap)->layer == NULL) if (((guac_rdp_bitmap*) bitmap)->layer == NULL)
guac_rdp_cache_bitmap(context, bitmap); guac_rdp_cache_bitmap(context, bitmap);

View File

@ -361,6 +361,13 @@ void guac_rdp_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt) {
int y_src = memblt->nYSrc; int y_src = memblt->nYSrc;
rdp_guac_client_data* data = (rdp_guac_client_data*) client->data; rdp_guac_client_data* data = (rdp_guac_client_data*) client->data;
/* Make sure that the recieved bitmap is not NULL before processing */
if (bitmap == NULL) {
guac_client_log_info(client, "NULL bitmap found in memblt instruction.");
return;
}
pthread_mutex_lock(&(data->update_lock)); pthread_mutex_lock(&(data->update_lock));
/* Clip operation to bounds */ /* Clip operation to bounds */