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
This commit is contained in:
Vincent Penquerc'h 2014-04-10 11:14:25 +01:00
parent 374e756eee
commit dda777803c

View file

@ -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;