diff options
author | Mans Rullgard <mans@mansr.com> | 2011-10-08 01:59:51 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-10-09 16:53:31 +0100 |
commit | 8b19ae07616bbd18969b94cbf5d74308a8f2bbdf (patch) | |
tree | 8623bbd3bbc9d3b188645c05c8688d2cb74524b2 /libavutil | |
parent | 0836d48a16419faf742e999f565dc50d863d0f55 (diff) | |
download | ffmpeg-8b19ae07616bbd18969b94cbf5d74308a8f2bbdf.tar.gz |
crc: fix signed overflow
This fixes a signed overflow from i << 24 when i == 255 by
making i unsigned. The result of the shift is already
assigned to an variable of unsigned type.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/crc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/crc.c b/libavutil/crc.c index 6c9f92809f..44719ffaee 100644 --- a/libavutil/crc.c +++ b/libavutil/crc.c @@ -57,7 +57,7 @@ static AVCRC av_crc_table[AV_CRC_MAX][257]; * @return <0 on failure */ int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size){ - int i, j; + unsigned i, j; uint32_t c; if (bits < 8 || bits > 32 || poly >= (1LL<<bits)) |