From dda777803cbf203969950ee61ec000a212057cbb Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Thu, 10 Apr 2014 11:14:25 +0100 Subject: [PATCH] audiocdsrc: guard aginst overflow An audio CD may contain about a tenth of the samples 32 bit can represent, so it doesn't seem likely this will be hit in practice. Coverity 1139805 --- gst-libs/gst/audio/gstaudiocdsrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/audio/gstaudiocdsrc.c b/gst-libs/gst/audio/gstaudiocdsrc.c index ebb6ecedcb..a384d42dd4 100644 --- a/gst-libs/gst/audio/gstaudiocdsrc.c +++ b/gst-libs/gst/audio/gstaudiocdsrc.c @@ -519,7 +519,7 @@ gst_audio_cd_src_convert (GstAudioCdSrc * src, GstFormat src_format, goto wrong_value; } src_format = GST_FORMAT_DEFAULT; - src_val = src->priv->tracks[src_val].start * SAMPLES_PER_SECTOR; + src_val = src->priv->tracks[src_val].start * (gint64) SAMPLES_PER_SECTOR; } else if (src_format == sector_format) { src_format = GST_FORMAT_DEFAULT; src_val = src_val * SAMPLES_PER_SECTOR;