diff options
author | Robert Shih <robertshih@google.com> | 2015-09-02 16:46:59 -0700 |
---|---|---|
committer | The Android Automerger <android-build@google.com> | 2015-09-28 17:08:17 -0700 |
commit | d3e29ba2b9bc735e246d055b0259e1a32a5728d5 (patch) | |
tree | 7c754dac942c85e28f9662603b93661bdb527c8e /media/libmedia/IAudioPolicyService.cpp | |
parent | 0ddd3f4a20e13914b5a4253d38b6887557f2ca1d (diff) | |
download | frameworks_av-d3e29ba2b9bc735e246d055b0259e1a32a5728d5.zip frameworks_av-d3e29ba2b9bc735e246d055b0259e1a32a5728d5.tar.gz frameworks_av-d3e29ba2b9bc735e246d055b0259e1a32a5728d5.tar.bz2 |
Zero out return values in audio binder calls
More specifically when handling GET_OUTPUT_FOR_ATTR in IAudioPolicyService.
This prevents leaking a uninitialized `output` across binder if
getOutputForAttr were to encounter errors.
Bug: 23756261
Change-Id: Ibff8a1249a4e8a3c89a33a540dda428b10d6ca82
Diffstat (limited to 'media/libmedia/IAudioPolicyService.cpp')
-rw-r--r-- | media/libmedia/IAudioPolicyService.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libmedia/IAudioPolicyService.cpp b/media/libmedia/IAudioPolicyService.cpp index baa5c7d..7e6b9fc 100644 --- a/media/libmedia/IAudioPolicyService.cpp +++ b/media/libmedia/IAudioPolicyService.cpp @@ -877,7 +877,7 @@ status_t BnAudioPolicyService::onTransact( if (hasOffloadInfo) { data.read(&offloadInfo, sizeof(audio_offload_info_t)); } - audio_io_handle_t output; + audio_io_handle_t output = 0; status_t status = getOutputForAttr(hasAttributes ? &attr : NULL, &output, session, &stream, uid, samplingRate, format, channelMask, |