gunzip: the extra length field (XLEN) is two bytes instead of one

example file:
https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R50f.tgz
This commit is contained in:
cinap_lenrek 2015-05-15 07:53:22 +02:00
parent 20b8f1e777
commit 0d701b7759

View file

@ -236,9 +236,12 @@ header(Biobuf *bin, GZHead *h)
/* OS type */
get1(bin);
if(flag & GZFEXTRA)
for(i=get1(bin); i>0; i--)
if(flag & GZFEXTRA){
i = get1(bin);
i |= get1(bin)<<8;
for(; i>0; i--)
get1(bin);
}
/* name */
if(flag & GZFNAME){