libfreerdp-core: fix reading TS_ICON_INFO
authorilammy <a.lozovsky@gmail.com>
Sat, 10 Nov 2018 20:09:20 +0000 (22:09 +0200)
committerArmin Novak <armin.novak@thincast.com>
Wed, 14 Nov 2018 09:53:45 +0000 (10:53 +0100)
commit7a2b6e1301a992892314ace37901a2aba1892b3b
treea518d27de7b6ee35870c9bae312e2a93bd592740
parentca6d1d59196e22dd044add9c0d570b4e5e42f3ff
libfreerdp-core: fix reading TS_ICON_INFO

The spec says that CbColorTable field is present when Bpp is 1, 4, 8.
Actually, bpp == 2 is not supported by TS_ICON_INFO according to the
spec (though, DIB definitely supports 16-color images).

    MS-RDPERP 2.2.1.2.3 Icon Info (TS_ICON_INFO)

    CbColorTable (2 bytes):
        This field is ONLY present if the bits per pixel (Bpp)
        value is 1, 4, or 8.

Omitting 8-bit value breaks 256-color icons which are incorrectly
read with color and alpha data mixed up.
libfreerdp/core/window.c