unzip/zipfs: handle optional data descriptor signature in trailer

This commit is contained in:
cinap_lenrek 2013-10-10 07:42:13 +02:00
parent 3b99a60154
commit 7f57d5d9c5
2 changed files with 4 additions and 0 deletions

View file

@ -657,6 +657,8 @@ trailer(Biobuf *bin, ZipHead *zh)
{
if(zh->flags & ZTrailInfo){
zh->crc = get4(bin);
if(zh->crc == 0x08074b50) /* thanks apple */
zh->crc = get4(bin);
zh->csize = get4(bin);
zh->uncsize = get4(bin);
}

View file

@ -304,6 +304,8 @@ trailer(Biobuf *bin, ZipHead *zh)
{
if(zh->flags & ZTrailInfo){
zh->crc = get4(bin);
if(zh->crc == 0x08074b50) /* thanks apple */
zh->crc = get4(bin);
zh->csize = get4(bin);
zh->uncsize = get4(bin);
}