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

Commit dd9fa318 authored by Kumar Anurag Singh's avatar Kumar Anurag Singh Committed by Santhosh Basappa
Browse files

audio-effects: Fix out-of-bound read

Modified check to avoid out-of-bound read.

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


#define LOG_TAG "offload_effect_equalizer"
#define LOG_TAG "offload_effect_equalizer"
@@ -425,7 +430,7 @@ int equalizer_set_parameter(effect_context_t *context, effect_param_t *p,
        equalizer_set_preset(eq_ctxt, preset);
        equalizer_set_preset(eq_ctxt, preset);
        break;
        break;
    case EQ_PARAM_BAND_LEVEL:
    case EQ_PARAM_BAND_LEVEL:
        if (vsize < sizeof(int16_t)) {
        if (vsize < sizeof(int32_t)) {
            p->status = -EINVAL;
            p->status = -EINVAL;
            break;
            break;
        }
        }