summaryrefslogtreecommitdiffstats
path: root/external/neon/ubsan.patch
blob: 56445fcb7e1700d05921de7d8d284643a0e4b64f (plain)
1
2
3
4
5
6
7
8
9
10
11
--- src/ne_compress.c
+++ src/ne_compress.c
@@ -81,7 +81,7 @@
 };
 
 /* Convert 'buf' to unsigned int; 'buf' must be 'unsigned char *' */
-#define BUF2UINT(buf) (((buf)[3]<<24) + ((buf)[2]<<16) + ((buf)[1]<<8) + (buf)[0])
+#define BUF2UINT(buf) (((unsigned)((buf)[3])<<24) + ((buf)[2]<<16) + ((buf)[1]<<8) + (buf)[0])
 
 #define ID1 0x1f
 #define ID2 0x8b