[Static Analysis][Dereference after null check] In function ots_post_serialise

RESOLVED INVALID

Status

()

Core
Graphics
RESOLVED INVALID
2 years ago
2 years ago

People

(Reporter: andi, Assigned: andi)

Tracking

(Blocks: 1 bug, {coverity})

Trunk
coverity
Points:
---

Firefox Tracking Flags

(firefox47 affected)

Details

(Whiteboard: CID 1352015 )

(Assignee)

Description

2 years ago
The Static Analysis tool Coverity added that pointer font is dereferenced before null check:

>>  const OpenTypePOST *post = font->post;
>>
>>  // OpenType with CFF glyphs must have v3 post table.
>>  if (post && font->cff && post->version != 0x00030000) {

We know for sure that font is a valid pointer since is passed from function OTSContext::Process->ProcessWOFF->ProcessGeneric->ots_post_serialise
In OTSContext::Process is declared on stack as:

>> Font font(&header);

and passed as a pointer as:

>>  if (data[0] == 'w' && data[1] == 'O' && data[2] == 'F' && data[3] == 'F') {
>>    result = ProcessWOFF(&header, &font, output, data, length);
(Assignee)

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INVALID
(Assignee)

Comment 1

2 years ago
This is not a bug it's been submitted by mistake.
You need to log in before you can comment on or make changes to this bug.