Fixed BehaviorSanitizer warnings.
authorakallabeth <akallabeth@posteo.net>
Fri, 15 May 2020 09:20:24 +0000 (11:20 +0200)
committerakallabeth <akallabeth@posteo.net>
Mon, 18 May 2020 15:10:01 +0000 (17:10 +0200)
(cherry picked from commit b5dfc15183b752a5d9c6da01225ed281b20001cf)

winpr/libwinpr/utils/lodepng/lodepng.c

index 227d469..87f8508 100644 (file)
@@ -327,7 +327,8 @@ static void string_set(char** out, const char* in)
 
 static unsigned lodepng_read32bitInt(const unsigned char* buffer)
 {
-       return (unsigned)((buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3]);
+       return (unsigned)(((unsigned)buffer[0] << 24) | ((unsigned)buffer[1] << 16) |
+                         ((unsigned)buffer[2] << 8) | buffer[3]);
 }
 
 #if defined(LODEPNG_COMPILE_PNG) || defined(LODEPNG_COMPILE_ENCODER)