Commit a198d7ab authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avcodec/motion_est: Fix xy indexing on range violation in ff_get_best_fcode()


This codepath seems untested, no testcases change

Found-by: <mkver>
Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 634312a7

)
Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent fbffe564
Showing with 1 addition and 2 deletions
+1 -2
......@@ -1634,7 +1634,7 @@ int ff_get_best_fcode(MpegEncContext * s, int16_t (*mv_table)[2], int type)
for(y=0; y<s->mb_height; y++){
int x;
int xy= y*s->mb_stride;
for(x=0; x<s->mb_width; x++){
for(x=0; x<s->mb_width; x++, xy++){
if(s->mb_type[xy] & type){
int mx= mv_table[xy][0];
int my= mv_table[xy][1];
......@@ -1651,7 +1651,6 @@ int ff_get_best_fcode(MpegEncContext * s, int16_t (*mv_table)[2], int type)
score[j]-= 170;
}
}
xy++;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment