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

Commit e1e328e7 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ALSA: core: Fix crash by avoiding appl_ptr crossing 32-bit boundary"

parents c08a19c9 73345215
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -748,7 +748,8 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream,
	runtime->silence_threshold = 0;
	runtime->silence_size = 0;
	runtime->boundary = runtime->buffer_size;
	while (runtime->boundary * 2 <= LONG_MAX - runtime->buffer_size)
	while (runtime->boundary * 2 * runtime->channels <=
					LONG_MAX - runtime->buffer_size)
		runtime->boundary *= 2;

	snd_pcm_timer_resolution_change(substream);