Merge branch 'issue-143-144' into 'master'

tiffdump: avoid unaligned memory access

Closes #144 et #143

See merge request libtiff/libtiff!133
This commit is contained in:
Even Rouault 2020-03-24 12:39:48 +00:00
commit ed881da0db

View File

@ -451,7 +451,7 @@ ReadDirectory(int fd, unsigned int ix, uint64 off)
{ {
datafits = 0; datafits = 0;
datamem = NULL; datamem = NULL;
dataoffset = *(uint64*)dp; memcpy(&dataoffset, dp, sizeof(uint64));
if (swabflag) if (swabflag)
TIFFSwabLong8(&dataoffset); TIFFSwabLong8(&dataoffset);
} }