mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-19 21:06:42 +00:00
avfilter/vf_signature: Fix integer overflow in filter_frame()
Fixes: CID1403233
The second of the 2 changes may be unneeded but will help coverity
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit dd6040675e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
273a3c5b82
commit
e028020213
@ -219,7 +219,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
|
||||
dw1 = inlink->w / 32;
|
||||
if (inlink->w % 32)
|
||||
dw2 = dw1 + 1;
|
||||
denom = (sc->divide) ? dh1 * dh2 * dw1 * dw2 : 1;
|
||||
denom = (sc->divide) ? dh1 * (int64_t)dh2 * dw1 * dw2 : 1;
|
||||
|
||||
for (i = 0; i < 32; i++) {
|
||||
rowcount = 0;
|
||||
@ -245,7 +245,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
|
||||
}
|
||||
}
|
||||
|
||||
denom = (sc->divide) ? 1 : dh1 * dh2 * dw1 * dw2;
|
||||
denom = (sc->divide) ? 1 : dh1 * (int64_t)dh2 * dw1 * dw2;
|
||||
|
||||
for (i = 0; i < ELEMENT_COUNT; i++) {
|
||||
const ElemCat* elemcat = elements[i];
|
||||
|
Loading…
Reference in New Issue
Block a user