From 072b3d9a0041c8ae5019a5e79e8447d458845d85 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Mon, 8 Jun 2020 07:09:07 +0200 Subject: [PATCH] Fixed #6267: adjust write_pixel_16 endian handling (cherry picked from commit 51d3e07c8a4bca32bf82538075e4518b63e8ed4d) --- libfreerdp/codec/interleaved.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libfreerdp/codec/interleaved.c b/libfreerdp/codec/interleaved.c index e9f92c7..b76fe1c 100644 --- a/libfreerdp/codec/interleaved.c +++ b/libfreerdp/codec/interleaved.c @@ -232,7 +232,8 @@ static INLINE void write_pixel_24(BYTE* _buf, UINT32 _pix) static INLINE void write_pixel_16(BYTE* _buf, UINT16 _pix) { - *(UINT16*)_buf = _pix; + _buf[0] = _pix & 0xFF; + _buf[1] = (_pix >> 8) & 0xFF; } #undef DESTWRITEPIXEL -- 2.7.4