client/X11: Check arguments in xf_Bitmap_SetSurface
authorOndrej Holy <oholy@redhat.com>
Mon, 4 Sep 2017 16:22:49 +0000 (18:22 +0200)
committerOndrej Holy <oholy@redhat.com>
Thu, 7 Sep 2017 07:38:44 +0000 (09:38 +0200)
commit4239660e3477fc4db87cd5b56c6d4ee1be17d81a
tree10f4017ac448df8429bd78758835d3366d4e9772
parent3b8352690e5ff1ab34357a2df2b6e22423bcea38
client/X11: Check arguments in xf_Bitmap_SetSurface

Arguments of xf_Bitmap_SetSurface are not checked before use currently
which may lead to segfaults. It may happen if bitmap is not found in a
cache from some reason. Let's check the arguments before use similarly
as it is done in client/Windows/wf_graphics.c in order to avoid segfaults.

https://github.com/FreeRDP/FreeRDP/issues/4117
client/X11/xf_graphics.c