shr -> shl typo in gzip "extra field" handling (gzio.pas)
Original Reporter info from Mantis: Brett
-
Reporter name:
Original Reporter info from Mantis: Brett
- Reporter name:
Description:
Line 454 of packages/paszlib/src/gzio.pas, in check_header():
len := len + (cardinal(get_byte(s)) shr 8);
shr should be shl. A byte shr 8 is obviously 0, so gzopen() will fail on a .gz file with an "extra field" size > 255 bytes (high byte in use).
Simple fix, change shr to shl (Official zlib C source is of course shift left also).
Mantis conversion info:
- Mantis ID: 16887
- Version: 2.4.3
- Fixed in version: 2.4.2
- Fixed in revision: 16251 (#b88162c7)