avcodec/x86/lossless_videoencdsp: Fix handling of small widths
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 29 Sep 2017 22:20:09 +0000 (00:20 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 4 Oct 2017 23:33:26 +0000 (01:33 +0200)
commit0eb0b21c7f4f2b6a3a74d2d252f95b81a4d472c3
treeb5118c5c6c739ba394a63aba64dec9a830cb1b53
parent2db9b3199641612c4cf91e1b356e40100019aa0b
avcodec/x86/lossless_videoencdsp: Fix handling of small widths

Fixes out of array access
Fixes: crash-huf.avi

Regression since: 6b41b4414934cc930468ccd5db598dd6ef643987

This could also be fixed by adding checks in the C code that calls the dsp

Found-by: Zhibin Hu and 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit df62b70de8aaa285168e72fe8f6e740843ca91fa)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/x86/huffyuvencdsp.asm