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

Unverified Commit 0d9e7bd1 authored by Michael Bestas's avatar Michael Bestas
Browse files

Merge tag 'LA.UM.9.12.r1-16200-SMxx50.QSSI12.0' into...

Merge tag 'LA.UM.9.12.r1-16200-SMxx50.QSSI12.0' into staging/lineage-20.0_merge-LA.UM.9.12.r1-16200-SMxx50.QSSI12.0

"LA.UM.9.12.r1-16200-SMxx50.QSSI12.0"

# By Manish Chaturvedi
# Via Linux Build Service Account (1) and Manish Chaturvedi (1)
* tag 'LA.UM.9.12.r1-16200-SMxx50.QSSI12.0':
  audio-hal: oob read when doing the typecase

Change-Id: I735c228112c01e42a5ce000d84893dd4bdedcbcb
parents 7aafa0bf bcdb8d02
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -15,6 +15,11 @@
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Changes from Qualcomm Innovation Center are provided under the following license:
 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause-Clear
 */

#define LOG_TAG "offload_effect_virtualizer"
@@ -400,6 +405,11 @@ int virtualizer_set_parameter(effect_context_t *context, effect_param_t *p,
        break;
    case VIRTUALIZER_PARAM_FORCE_VIRTUALIZATION_MODE:
    {
        if(p->vsize != sizeof(audio_devices_t)){
            ALOGE("%s: VIRTUALIZER_PARAM_FORCE_VIRTUALIZATION_MODE :  p->vsize != sizeof(audio_devices_t) , sending -EINVAL", __func__);
            p->status = -EINVAL;
            break;
        }
        const audio_devices_t device = *(audio_devices_t *)value;
        if (0 != virtualizer_force_virtualization_mode(virt_ctxt, device)) {
            p->status = -EINVAL;