diff options
author | Wei Jia <wjia@google.com> | 2015-09-17 13:36:52 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-09-17 13:36:52 +0000 |
commit | 190786d3590c6b064a7d32eaa92f4a7b11cf16d5 (patch) | |
tree | d10cf4ff409f32e9e59afe85240bcb91e1f0dbad | |
parent | 38281f1cbcd4804095828f19b7954d5219560fcd (diff) | |
parent | ae92251730865e0c4bc59ef2a8fe9dacb6de41b9 (diff) | |
download | frameworks_av-190786d3590c6b064a7d32eaa92f4a7b11cf16d5.zip frameworks_av-190786d3590c6b064a7d32eaa92f4a7b11cf16d5.tar.gz frameworks_av-190786d3590c6b064a7d32eaa92f4a7b11cf16d5.tar.bz2 |
am ae922517: Merge "DO NOT MERGE - IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel." into klp-dev
* commit 'ae92251730865e0c4bc59ef2a8fe9dacb6de41b9':
DO NOT MERGE - IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel.
-rw-r--r-- | media/libmedia/IAudioFlinger.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp index adc7186..98d3dee 100644 --- a/media/libmedia/IAudioFlinger.cpp +++ b/media/libmedia/IAudioFlinger.cpp @@ -766,7 +766,7 @@ status_t BnAudioFlinger::onTransact( int sessionId = data.readInt32(); int clientUid = data.readInt32(); String8 name; - status_t status; + status_t status = NO_ERROR; sp<IAudioTrack> track; if ((haveSharedBuffer && (buffer == 0)) || ((buffer != 0) && (buffer->pointer() == NULL))) { @@ -795,7 +795,7 @@ status_t BnAudioFlinger::onTransact( track_flags_t flags = (track_flags_t) data.readInt32(); pid_t tid = (pid_t) data.readInt32(); int sessionId = data.readInt32(); - status_t status; + status_t status = NO_ERROR; sp<IAudioRecord> record = openRecord(input, sampleRate, format, channelMask, frameCount, &flags, tid, &sessionId, &status); LOG_ALWAYS_FATAL_IF((record != 0) != (status == NO_ERROR)); @@ -1013,8 +1013,8 @@ status_t BnAudioFlinger::onTransact( case GET_RENDER_POSITION: { CHECK_INTERFACE(IAudioFlinger, data, reply); audio_io_handle_t output = (audio_io_handle_t) data.readInt32(); - size_t halFrames; - size_t dspFrames; + size_t halFrames = 0; + size_t dspFrames = 0; status_t status = getRenderPosition(&halFrames, &dspFrames, output); reply->writeInt32(status); if (status == NO_ERROR) { @@ -1048,7 +1048,7 @@ status_t BnAudioFlinger::onTransact( } break; case QUERY_NUM_EFFECTS: { CHECK_INTERFACE(IAudioFlinger, data, reply); - uint32_t numEffects; + uint32_t numEffects = 0; status_t status = queryNumberEffects(&numEffects); reply->writeInt32(status); if (status == NO_ERROR) { @@ -1058,7 +1058,7 @@ status_t BnAudioFlinger::onTransact( } case QUERY_EFFECT: { CHECK_INTERFACE(IAudioFlinger, data, reply); - effect_descriptor_t desc; + effect_descriptor_t desc = {}; status_t status = queryEffect(data.readInt32(), &desc); reply->writeInt32(status); if (status == NO_ERROR) { @@ -1070,7 +1070,7 @@ status_t BnAudioFlinger::onTransact( CHECK_INTERFACE(IAudioFlinger, data, reply); effect_uuid_t uuid; data.read(&uuid, sizeof(effect_uuid_t)); - effect_descriptor_t desc; + effect_descriptor_t desc = {}; status_t status = getEffectDescriptor(&uuid, &desc); reply->writeInt32(status); if (status == NO_ERROR) { @@ -1088,9 +1088,9 @@ status_t BnAudioFlinger::onTransact( int32_t priority = data.readInt32(); audio_io_handle_t output = (audio_io_handle_t) data.readInt32(); int sessionId = data.readInt32(); - status_t status; - int id; - int enabled; + status_t status = NO_ERROR; + int id = 0; + int enabled = 0; sp<IEffect> effect = createEffect(&desc, client, priority, output, sessionId, &status, &id, &enabled); |