--- ImfDwaCompressor.cpp 2018-10-29 14:28:52.759359986 -0700 +++ ../../../djv-git-third-party-Debug/OpenEXR-prefix/src/OpenEXR/IlmImf/ImfDwaCompressor.cpp 2018-10-29 11:56:08.000000000 -0700 @@ -2351,10 +2351,12 @@ // Flip the counters from XDR to NATIVE // + Int64 counterBuf[NUM_SIZES_SINGLE]; + memcpy(counterBuf, inPtr, NUM_SIZES_SINGLE * sizeof(Int64)); for (int i = 0; i < NUM_SIZES_SINGLE; ++i) { - Int64 *dst = (((Int64 *)inPtr) + i); - const char *src = (char *)(((Int64 *)inPtr) + i); + Int64 *dst = counterBuf + i; + const char *src = (char *)(counterBuf + i); Xdr::read (src, *dst); } @@ -2363,21 +2365,19 @@ // Unwind all the counter info // - const Int64 *inPtr64 = (const Int64*) inPtr; - - Int64 version = *(inPtr64 + VERSION); - Int64 unknownUncompressedSize = *(inPtr64 + UNKNOWN_UNCOMPRESSED_SIZE); - Int64 unknownCompressedSize = *(inPtr64 + UNKNOWN_COMPRESSED_SIZE); - Int64 acCompressedSize = *(inPtr64 + AC_COMPRESSED_SIZE); - Int64 dcCompressedSize = *(inPtr64 + DC_COMPRESSED_SIZE); - Int64 rleCompressedSize = *(inPtr64 + RLE_COMPRESSED_SIZE); - Int64 rleUncompressedSize = *(inPtr64 + RLE_UNCOMPRESSED_SIZE); - Int64 rleRawSize = *(inPtr64 + RLE_RAW_SIZE); + Int64 version = *(counterBuf + VERSION); + Int64 unknownUncompressedSize = *(counterBuf + UNKNOWN_UNCOMPRESSED_SIZE); + Int64 unknownCompressedSize = *(counterBuf + UNKNOWN_COMPRESSED_SIZE); + Int64 acCompressedSize = *(counterBuf + AC_COMPRESSED_SIZE); + Int64 dcCompressedSize = *(counterBuf + DC_COMPRESSED_SIZE); + Int64 rleCompressedSize = *(counterBuf + RLE_COMPRESSED_SIZE); + Int64 rleUncompressedSize = *(counterBuf + RLE_UNCOMPRESSED_SIZE); + Int64 rleRawSize = *(counterBuf + RLE_RAW_SIZE); - Int64 totalAcUncompressedCount = *(inPtr64 + AC_UNCOMPRESSED_COUNT); - Int64 totalDcUncompressedCount = *(inPtr64 + DC_UNCOMPRESSED_COUNT); + Int64 totalAcUncompressedCount = *(counterBuf + AC_UNCOMPRESSED_COUNT); + Int64 totalDcUncompressedCount = *(counterBuf + DC_UNCOMPRESSED_COUNT); - Int64 acCompression = *(inPtr64 + AC_COMPRESSION); + Int64 acCompression = *(counterBuf + AC_COMPRESSION); Int64 compressedSize = unknownCompressedSize + acCompressedSize +