Fixes out of array read
Fixes Ticket4121
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -193,7 +193,13 @@ static av_always_inline int cmp_inline(MpegEncContext *s, const int x, const int |
193 | 193 |
int uvdxy; /* no, it might not be used uninitialized */ |
194 | 194 |
if(dxy){ |
195 | 195 |
if(qpel){ |
196 |
- c->qpel_put[size][dxy](c->temp, ref[0] + x + y*stride, stride); //FIXME prototype (add h) |
|
196 |
+ if (h << size == 16) { |
|
197 |
+ c->qpel_put[size][dxy](c->temp, ref[0] + x + y*stride, stride); //FIXME prototype (add h) |
|
198 |
+ } else if (size == 0 && h == 8) { |
|
199 |
+ c->qpel_put[1][dxy](c->temp , ref[0] + x + y*stride , stride); |
|
200 |
+ c->qpel_put[1][dxy](c->temp + 8, ref[0] + x + y*stride + 8, stride); |
|
201 |
+ } else |
|
202 |
+ av_assert2(0); |
|
197 | 203 |
if(chroma){ |
198 | 204 |
int cx= hx/2; |
199 | 205 |
int cy= hy/2; |