Mercurial > libavcodec.hg
changeset 8321:e9db9859de6c libavcodec
Prevent shift overflow, patch by Anders Grnberg, galileo.m2 gmail com.
author | diego |
---|---|
date | Sun, 14 Dec 2008 12:30:34 +0000 |
parents | 0de488aa4fb0 |
children | 8daa347431a4 |
files | imgconvert.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/imgconvert.c Sun Dec 14 12:24:50 2008 +0000 +++ b/imgconvert.c Sun Dec 14 12:30:34 2008 +0000 @@ -784,7 +784,7 @@ dst_pix_fmt = -1; min_dist = 0x7fffffff; for(i = 0;i < PIX_FMT_NB; i++) { - if (pix_fmt_mask & (1 << i)) { + if (pix_fmt_mask & (1ULL << i)) { loss = avcodec_get_pix_fmt_loss(i, src_pix_fmt, has_alpha) & loss_mask; if (loss == 0) { dist = avg_bits_per_pixel(i);