cache: Check return value from offscreen_cache_get
authorOndrej Holy <oholy@redhat.com>
Mon, 4 Sep 2017 16:48:25 +0000 (18:48 +0200)
committerOndrej Holy <oholy@redhat.com>
Thu, 7 Sep 2017 07:38:44 +0000 (09:38 +0200)
commit5d6e2078c70d0de51da19b267d4776bcbbd4b927
tree9e303c87ff677b094aeb9e1462b86ea1a8b519ff
parent4239660e3477fc4db87cd5b56c6d4ee1be17d81a
cache: Check return value from offscreen_cache_get

Currently, SetSurface is called regardless of return value from
offscreen_cache_get. It may happen that bitmap is not found in a
cache from some reason, which may lead to segfaults. Let's check
the returned value before use.

https://github.com/FreeRDP/FreeRDP/issues/4117
libfreerdp/cache/offscreen.c