Unverified Commit 08b00a96 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!13386 [sync] PR-13304: ALSA: firewire-lib: Avoid division by zero in apply_constraint_to_size()

parents 05edf786 e9de02c6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -163,6 +163,9 @@ static int apply_constraint_to_size(struct snd_pcm_hw_params *params,
			step = max(step, amdtp_syt_intervals[i]);
	}

	if (step == 0)
		return -EINVAL;

	t.min = roundup(s->min, step);
	t.max = rounddown(s->max, step);
	t.integer = 1;