Fix (minor) problems found by ubsan
[openssl.git] / crypto / evp / scrypt.c
index 26b4e596ba2bb7c6f5d16ba590a37cf6562a51d2..e609594a91e1ddd917fdd4232174d9f05f83b94d 100644 (file)
@@ -139,7 +139,7 @@ static void scryptROMix(unsigned char *B, uint64_t r, uint64_t N,
         *pV = *pB++;
         *pV |= *pB++ << 8;
         *pV |= *pB++ << 16;
-        *pV |= *pB++ << 24;
+        *pV |= (uint32_t)*pB++ << 24;
     }
 
     for (i = 1; i < N; i++, pV += 32 * r)