flacdec: fix theoretical integer overflow

This code isn't actually used at the moment, unsure if I should
just remove it or not...

Coverity 1139811
This commit is contained in:
Vincent Penquerc'h 2014-05-02 13:59:07 +01:00
parent 5c22bcf6e9
commit d2f66f5394

View file

@ -421,7 +421,7 @@ gst_flac_dec_scan_got_frame (GstFlacDec * flacdec, guint8 * data, guint size,
} }
if (flacdec->min_blocksize == flacdec->max_blocksize) { if (flacdec->min_blocksize == flacdec->max_blocksize) {
*last_sample_num = (val + 1) * flacdec->min_blocksize; *last_sample_num = ((guint64) val + 1) * flacdec->min_blocksize;
} else { } else {
*last_sample_num = 0; /* FIXME: + length of last block in samples */ *last_sample_num = 0; /* FIXME: + length of last block in samples */
} }