Wrong XLEN of gzip extra field in HTTP Compress converter

RESOLVED DUPLICATE of bug 234031

Status

()

RESOLVED DUPLICATE of bug 234031
12 years ago
3 years ago

People

(Reporter: jinq0123, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: firefox-2.0.0.4-source

I think it must be a typo. 
In file netwerk/streamconv/converters/nsHTTPCompressConv.cpp:

            case GZIP_EXTRA1:
                iStr->Read(&c, 1, &rv);
                streamLen--;
-               mLen = ((uInt) c & 0377) << 8;
+               mLen |= ((uInt) c & 0377) << 8;
                mSkipCount = 0;
                hMode = GZIP_EXTRA2;
                break;

mLen should be calculated from 2 bytes XLEN according to rfc1952:

      (if FLG.FEXTRA set)

         +---+---+=================================+
         | XLEN  |...XLEN bytes of "extra field"...| (more-->)
         +---+---+=================================+



Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 234031
You need to log in before you can comment on or make changes to this bug.