Closed Bug 1247246 Opened 8 years ago Closed 8 years ago

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

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox47 --- affected

People

(Reporter: andi, Assigned: andi)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: CID 1352015 )

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);
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
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.