Open Bug 610079 Opened 14 years ago Updated 1 year ago

libssl: ssl3_DeflateDecompress needs to verify decompressoin finished

Categories

(NSS :: Libraries, defect, P5)

Tracking

(Not tracked)

People

(Reporter: briansmith, Unassigned)

References

Details

inflate() will return Z_OK if the output buffer fills up before all the decompressed data can be written to it. The current code assumes Z_OK means that all the data has been decompressed. After the check for Z_OK, a check for avail_out > 0 and/or avail_in == 0 needs to be made. I think the caller also needs to ensure that there is extra space in the output buffer so that avail_out==0 isn't ambiguous. Alternately, when avail_out==0 then we can call inflate() again with a temporary (stack) buffer as the output buffer, and fail if inflate() actually writes anything to that buffer.
Severity: normal → S3
Severity: S3 → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.