projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f25c2f2
)
Fixed undefined behaviour in ncrush
author
akallabeth
<akallabeth@posteo.net>
Fri, 15 May 2020 13:43:33 +0000
(15:43 +0200)
committer
akallabeth
<akallabeth@posteo.net>
Mon, 18 May 2020 15:10:01 +0000
(17:10 +0200)
(cherry picked from commit
83137d2a1bb732fbea2f20778924a50a79f63fef
)
libfreerdp/codec/ncrush.c
patch
|
blob
|
history
diff --git
a/libfreerdp/codec/ncrush.c
b/libfreerdp/codec/ncrush.c
index
af503fc
..
3d6a216
100644
(file)
--- a/
libfreerdp/codec/ncrush.c
+++ b/
libfreerdp/codec/ncrush.c
@@
-1926,9
+1926,9
@@
static INLINE UINT16 get_word(const BYTE* data)
static INLINE UINT32 get_dword(const BYTE* data)
{
UINT32 tmp = *data++;
- tmp |= *data++ << 8U;
- tmp |= *data++ << 16U;
- tmp |= *data++ << 24U;
+ tmp |=
(UINT32)
*data++ << 8U;
+ tmp |=
(UINT32)
*data++ << 16U;
+ tmp |=
(UINT32)
*data++ << 24U;
return tmp;
}