Use correct byte order when parsing the size of the gzip "Extra data" field.
In particular, this correctly allows bsdtar (and pkg_add) to skip package signatures. Thanks to: Theo Schlossnagle
This commit is contained in:
parent
32b56c9d75
commit
84875e4d6f
@ -426,7 +426,7 @@ drive_decompressor(struct archive *a, struct private_data *state)
|
||||
*/
|
||||
case 11: /* Optional Extra: Second byte of Length. */
|
||||
if ((flags & 4)) {
|
||||
count = (count << 8) | (255 & (int)b);
|
||||
count = (0xff00 & ((int)b << 8)) | count;
|
||||
header_state = 12;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user