Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b6776488 authored by George Burgess IV's avatar George Burgess IV
Browse files

mp4: fix potential dereferences of NULL

clang's static analyzer wasn't happy about the potential load of NULL
from mLastTrack on line (after this patch) 4606:

> frameworks/av/media/extractors/mp4/MPEG4Extractor.cpp:4663:32:
warning: Access to field 'meta' results in a dereference of a null
pointer (loaded from field 'mLastTrack')
[clang-analyzer-core.NullDereference]

Since there's a NULL check above, the analyzer assumes `mLastTrack` may be
NULL here. This doesn't seem like an unreasonable assumption to me.

While I'm in the area, looks like we may have the same issue with MP3,
so I've opportunistically added a NULL check there.

Bug: None
Test: TreeHugger
Change-Id: I1e1be8bdb36fd059e1f4eabc165650389d02e45e
parent e392f2cf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment