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

Commit edba33aa authored by Ramjee Singh's avatar Ramjee Singh Committed by Gerrit - the friendly Code Review server
Browse files

misc: qcom: qdsp6v2: correct validation check for asfpacketlength



Input validation check for asfpacketlength is not correct as range
of variable should be greater than 0 and less than max value.

Change-Id: Ie4e0991518a01d63fb65e5b589c01f213af68743
Signed-off-by: default avatarRamjee Singh <ramjee@codeaurora.org>
parent 38bc3d98
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
 *
 * Copyright (C) 2008 Google, Inc.
 * Copyright (C) 2008 HTC Corporation
 * Copyright (c) 2009-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2009-2017, The Linux Foundation. All rights reserved.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
@@ -87,7 +87,7 @@ static long audio_ioctl_shared(struct file *file, unsigned int cmd,
		}
		wmapro_cfg.avg_bytes_per_sec =
				wmapro_config->avgbytespersecond;
		if ((wmapro_config->asfpacketlength <= 13376) ||
		if ((wmapro_config->asfpacketlength <= 13376) &&
			(wmapro_config->asfpacketlength > 0)) {
			wmapro_cfg.block_align =
				wmapro_config->asfpacketlength;