We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e4c52e6 + 48df7da commit 2d66993Copy full SHA for 2d66993
ext/standard/image.c
@@ -749,10 +749,10 @@ static signed short php_ifd_get16s(void *Short, int motorola_intel)
749
static int php_ifd_get32s(void *Long, int motorola_intel)
750
{
751
if (motorola_intel) {
752
- return ((( char *)Long)[0] << 24) | (((unsigned char *)Long)[1] << 16)
753
- | (((unsigned char *)Long)[2] << 8 ) | (((unsigned char *)Long)[3] << 0 );
+ return ((unsigned)((( char *)Long)[0]) << 24) | (((unsigned char *)Long)[1] << 16)
+ | ((( char *)Long)[2] << 8 ) | (((unsigned char *)Long)[3] << 0 );
754
} else {
755
- return ((( char *)Long)[3] << 24) | (((unsigned char *)Long)[2] << 16)
+ return ((unsigned)((( char *)Long)[3]) << 24) | (((unsigned char *)Long)[2] << 16)
756
| (((unsigned char *)Long)[1] << 8 ) | (((unsigned char *)Long)[0] << 0 );
757
}
758
0 commit comments