In translate24to32, only read 3 bytes from data buffer. If we are
reading 4 bytes, we are reading beyond the buffer. Fixes valgrind warnings. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1039 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
4cd9674c78
commit
d8a0e374a6
3
xwin.c
3
xwin.c
@ -802,7 +802,8 @@ translate24to32(const uint8 * data, uint8 * out, uint8 * end)
|
||||
#else
|
||||
REPEAT4
|
||||
(
|
||||
*((uint32 *) out) = *((uint32 *) data);
|
||||
/* Only read 3 bytes. Reading 4 bytes means reading beyound buffer. */
|
||||
*((uint32 *) out) = *((uint16 *) data) + (*((uint8 *) data + 2) << 16);
|
||||
out += 4;
|
||||
data += 3;
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user