[FFmpeg-devel] [PATCH] Fix crash if av_vdpau_bind_context() is not used.
ikalvachev at gmail.com
Fri Oct 13 01:22:17 EEST 2017
On 10/13/17, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> 2017-10-09 2:04 GMT+02:00 Ivan Kalvachev <ikalvachev at gmail.com>:
>> The public functions av_alloc_vdpaucontext() and
>> av_vdpau_alloc_context() are allocating AVVDPAUContext
>> structure that is supposed to be placed in avctx->hwaccel_context.
>> However the rest of libavcodec/vdpau.c uses avctx->hwaccel_context
>> as struct VDPAUHWContext, that is bigger and does contain
>> AVVDPAUContext as first member.
>> The usage includes write to the new variables in the bigger stuct,
>> without checking for block size.
>> Fix by always allocating the bigger structure.
> Patch applied and backported.
> Thank you, Carl Eugen
More information about the ffmpeg-devel