fix an undefined shift

This commit is contained in:
John Cupitt 2022-09-15 12:57:36 +01:00
parent d2e7d036ae
commit 3b33d912c4

View File

@ -306,11 +306,12 @@ static int
vips_foreign_load_heif_is_a( const char *buf, int len ) vips_foreign_load_heif_is_a( const char *buf, int len )
{ {
if( len >= 12 ) { if( len >= 12 ) {
const guint32 chunk_len = unsigned char *p = (unsigned char *) buf;
(unsigned char) buf[0] << 24 | guint32 chunk_len =
(unsigned char) buf[1] << 16 | VIPS_LSHIFT_INT( p[0], 24 ) |
(unsigned char) buf[2] << 8 | VIPS_LSHIFT_INT( p[1], 16 ) |
(unsigned char) buf[3]; VIPS_LSHIFT_INT( p[2], 8 ) |
VIPS_LSHIFT_INT( p[3], 0 );
int i; int i;