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:
Tim Kientzle 2005-03-02 05:34:05 +00:00
parent 32b56c9d75
commit 84875e4d6f

View File

@ -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;
}