File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838
3939// HISTORY
4040// 2009-08-11 T9121 Geoff Hart Added Multi-member gzip support
41- // 2012-06-03 Z-1802 Incorrect endianness in FEXTRA handling
41+ // 2012-06-03 Z-1802 Incorrect endianness and subfield in FEXTRA handling.
4242
4343using System ;
4444using System . IO ;
@@ -258,19 +258,8 @@ bit 7 reserved
258258
259259 // 7. Read extra field
260260 if ( ( flags & GZipConstants . FEXTRA ) != 0 ) {
261- // Skip subfield id
262- for ( int i = 0 ; i < 2 ; i ++ ) {
263- int readByte = inputBuffer . ReadLeByte ( ) ;
264- if ( readByte < 0 ) {
265- throw new EndOfStreamException ( "EOS reading GZIP header" ) ;
266- }
267- headCRC . Update ( readByte ) ;
268- }
269-
270- if ( inputBuffer . ReadLeByte ( ) < 0 || inputBuffer . ReadLeByte ( ) < 0 ) {
271- throw new EndOfStreamException ( "EOS reading GZIP header" ) ;
272- }
273261
262+ // XLEN is total length of extra subfields, we will skip them all
274263 int len1 , len2 ;
275264 len1 = inputBuffer . ReadLeByte ( ) ;
276265 len2 = inputBuffer . ReadLeByte ( ) ;
You can’t perform that action at this time.
0 commit comments