diff options
author | Robert Shih <robertshih@google.com> | 2015-09-02 16:46:59 -0700 |
---|---|---|
committer | Robert Shih <robertshih@google.com> | 2015-09-02 18:02:12 -0700 |
commit | a946d844a77906072f5eb7093d41db465d6514bb (patch) | |
tree | 5607592deedd9e9538aad3736253a37dea5d38ee /media/libmedia | |
parent | 66b24004345ff8a688e8548409b0b7d5a8902232 (diff) | |
download | frameworks_av-a946d844a77906072f5eb7093d41db465d6514bb.zip frameworks_av-a946d844a77906072f5eb7093d41db465d6514bb.tar.gz frameworks_av-a946d844a77906072f5eb7093d41db465d6514bb.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')
-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 12efa8a..d91b73b 100644 --- a/media/libmedia/IAudioPolicyService.cpp +++ b/media/libmedia/IAudioPolicyService.cpp @@ -816,7 +816,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, samplingRate, format, channelMask, |