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

Commit a946d844 authored by Robert Shih's avatar Robert Shih
Browse files

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
parent 66b24004
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,