summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-08-01 19:00:33 -0700
committerEric Laurent <elaurent@google.com>2014-08-04 09:48:17 -0700
commit44622db93a24219123facbbe14259000f90de728 (patch)
treee9d4700757e0546ec0f8e76330d1ff5d421374f5 /services/audioflinger
parent678792e362c4cd70640934049491d9f21560c63b (diff)
downloadframeworks_av-44622db93a24219123facbbe14259000f90de728.zip
frameworks_av-44622db93a24219123facbbe14259000f90de728.tar.gz
frameworks_av-44622db93a24219123facbbe14259000f90de728.tar.bz2
audio flinger: fix service fuzz test crash
Bug: 13744704. Change-Id: I572c89f88dcab2b8b612ec6860983306f9f159ab
Diffstat (limited to 'services/audioflinger')
-rw-r--r--services/audioflinger/AudioFlinger.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index bd7121e..b8cc33a 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1159,6 +1159,9 @@ status_t AudioFlinger::getRenderPosition(uint32_t *halFrames, uint32_t *dspFrame
void AudioFlinger::registerClient(const sp<IAudioFlingerClient>& client)
{
Mutex::Autolock _l(mLock);
+ if (client == 0) {
+ return;
+ }
bool clientAdded = false;
{
Mutex::Autolock _cl(mClientLock);
@@ -1453,6 +1456,9 @@ Exit:
audio_module_handle_t AudioFlinger::loadHwModule(const char *name)
{
+ if (name == NULL) {
+ return 0;
+ }
if (!settingsAllowed()) {
return 0;
}