Skip to content

Commit

Permalink
fix order reading
Browse files Browse the repository at this point in the history
spec says so, cite it in commit messa

spec reference
  • Loading branch information
ilammy committed Nov 12, 2018
1 parent c5c1bac commit 1eeff89
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions libfreerdp/core/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,13 @@ BOOL update_read_icon_info(wStream* s, ICON_INFO* iconInfo)
Stream_Read_UINT16(s, iconInfo->width); /* width (2 bytes) */
Stream_Read_UINT16(s, iconInfo->height); /* height (2 bytes) */

/* cbColorTable is only present when bpp is 1, 2 or 4 */
if (iconInfo->bpp == 1 || iconInfo->bpp == 2 || iconInfo->bpp == 4)
/*
* 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.
*/
if (iconInfo->bpp == 1 || iconInfo->bpp == 4 || iconInfo->bpp == 8)
{
if (Stream_GetRemainingLength(s) < 2)
return FALSE;
Expand Down

0 comments on commit 1eeff89

Please sign in to comment.