mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-21 06:50:56 +00:00
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>
(cherry picked from commit 8b19ae0761
)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
48f9a80072
commit
5e3ba60e6f
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user