Update exif-loader.c (#33)
authororangesnn <52818007+orangesnn@users.noreply.github.com>
Sun, 23 Feb 2020 09:28:19 +0000 (17:28 +0800)
committerGitHub <noreply@github.com>
Sun, 23 Feb 2020 09:28:19 +0000 (10:28 +0100)
undefined behaviour : cannot be represented in type 'int'

libexif/exif-loader.c

index 1171485..f0f0463 100644 (file)
@@ -239,7 +239,7 @@ exif_loader_write (ExifLoader *eld, unsigned char *buf, unsigned int len)
                        break;
 
                case EL_READ_SIZE_BYTE_24:
-                       eld->size |= eld->b[i] << 24;
+                       eld->size |= (unsigned int)eld->b[i] << 24;
                        eld->state = EL_READ_SIZE_BYTE_16;
                        break;
                case EL_READ_SIZE_BYTE_16: