avutil/intmath: fix possible array overread

This commit is contained in:
Paul B Mahol 2024-06-15 11:02:57 +02:00
parent 11fdcb9364
commit b8593a2bd8

View File

@ -75,7 +75,7 @@ static av_always_inline av_const int ff_log2_16bit_c(unsigned int v)
v >>= 8;
n += 8;
}
n += ff_log2_tab[v];
n += ff_log2_tab[v & 0xff];
return n;
}