Closed Bug 1231351 Opened 4 years ago Closed 4 years ago

[Static Analysis][Operands don't affect result] In function ConvertWOFF2ToSFNT from woff2.cc - unnecessary code removal

Categories

(Core :: Graphics, defect)

defect
Not set

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox45 --- affected

People

(Reporter: andi, Assigned: andi)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, feature, Whiteboard: CID 1327932)

Attachments

(1 file)

The Static Analysis tool Coverity added that expression will never be valid:

>> if (compressed_length > std::numeric_limits<uint32_t>::max()) {
>>    return OTS_FAILURE();
>>  }

since type of compressed_length is:

>> uint32_t compressed_length;

it's obvious it cannot hold a number greater than 2^32. I suggest removing the if statement.
Attached patch Bug 1231351.diffSplinter Review
Attachment #8696977 - Flags: review?(jmuizelaar)
This should probably be reported directly upstream to OTS
Attachment #8696977 - Flags: review?(jmuizelaar) → review-
this patch is no longer needed since the new framework for OTS is used and this is obsolete.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.