From: Vincent Penquerc'h Date: Fri, 2 May 2014 12:59:07 +0000 (+0100) Subject: flacdec: fix theoretical integer overflow X-Git-Tag: 1.19.3~509^2~4610 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2f66f5394749ca05090c289c56ca6768ae4527c;p=platform%2Fupstream%2Fgstreamer.git 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 --- diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c index 08a93bd242..3537fc2506 100644 --- a/ext/flac/gstflacdec.c +++ b/ext/flac/gstflacdec.c @@ -421,7 +421,7 @@ gst_flac_dec_scan_got_frame (GstFlacDec * flacdec, guint8 * data, guint size, } 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 { *last_sample_num = 0; /* FIXME: + length of last block in samples */ }