All of lore.kernel.org
 help / color / mirror / Atom feed
* Use-before-initialization in alsa-oss
@ 2007-10-06 10:16 Alexander E. Patrakov
  2007-10-06 17:33 ` Jaroslav Kysela
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander E. Patrakov @ 2007-10-06 10:16 UTC (permalink / raw)
  To: alsa-devel

dsp->oss_format was used before it was set correctly

spotted by running "aoss flite_time 10:00"
Signed-Off-By: Alexander E. Patrakov

--- alsa-oss-1.0.14.orig/alsa/pcm.c	2007-09-29 16:12:44.000000000 +0600
+++ alsa-oss-1.0.14/alsa/pcm.c	2007-09-29 16:13:06.000000000 +0600
@@ -215,10 +215,10 @@
 		unsigned int rate, periods_min;
 		if (!pcm)
 			continue;
+		dsp->format = oss_format_to_alsa(dsp->oss_format);
 		str->frame_bytes = snd_pcm_format_physical_width(dsp->format) * dsp->channels / 8;
 		snd_pcm_hw_params_alloca(&hw);
 		snd_pcm_hw_params_any(pcm, hw);
-		dsp->format = oss_format_to_alsa(dsp->oss_format);
 
 		err = snd_pcm_hw_params_set_format(pcm, hw, dsp->format);
 		if (err < 0)



-- 
Alexander E. Patrakov

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Use-before-initialization in alsa-oss
  2007-10-06 10:16 Use-before-initialization in alsa-oss Alexander E. Patrakov
@ 2007-10-06 17:33 ` Jaroslav Kysela
  0 siblings, 0 replies; 2+ messages in thread
From: Jaroslav Kysela @ 2007-10-06 17:33 UTC (permalink / raw)
  To: Alexander E. Patrakov; +Cc: alsa-devel

On Sat, 6 Oct 2007, Alexander E. Patrakov wrote:

> dsp->oss_format was used before it was set correctly
> 
> spotted by running "aoss flite_time 10:00"
> Signed-Off-By: Alexander E. Patrakov

Applied. Thanks.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-06 17:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-06 10:16 Use-before-initialization in alsa-oss Alexander E. Patrakov
2007-10-06 17:33 ` Jaroslav Kysela

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.