From e8ac08c520929b5408e5283d611a48e92997fecd Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Wed, 19 Jan 2005 21:43:54 +0000 Subject: [PATCH] ext/alsa/gstalsasink.c: Safety guard. Original commit message from CVS: * ext/alsa/gstalsasink.c: (gst_alsa_sink_loop): Safety guard. --- ChangeLog | 5 +++++ ext/alsa/gstalsasink.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 472c0ae9fc..ed2a8b162d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-01-19 Ronald S. Bultje + + * ext/alsa/gstalsasink.c: (gst_alsa_sink_loop): + Safety guard. + 2005-01-19 Ronald S. Bultje * gst/avi/gstavimux.c: (gst_avimux_write_tag): diff --git a/ext/alsa/gstalsasink.c b/ext/alsa/gstalsasink.c index 01154b6293..21b11efab9 100644 --- a/ext/alsa/gstalsasink.c +++ b/ext/alsa/gstalsasink.c @@ -447,7 +447,7 @@ sink_restart: int width = snd_pcm_format_physical_width (this->format->format); int size = samples * width / 8; - if (size / (width / 8) != samples) { + if (size / (width / 8) != samples || samples > max_discont) { GST_WARNING_OBJECT (this, "Integer overflow for size=%d/samples=%d - broken stream", size, samples);