You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/vp9: Fix stack-buffer overflow with VP9 VDPAU available
ccca62ef99
added new VP9 VDPAU profiles
and as a consequence AV_PIX_FMT_VDPAU can now be twice in the list of
pixel formats used for format negotiation by ff_thread_get_format(); yet
there is only one entry in said list reserved for VDPAU, leading to a
stack-buffer overflow. This commit fixes this by making sure that
AV_PIX_FMT_VDPAU will not occur twice in said list.
Fixes Coverity ticket 1468046.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
@@ -207,9 +207,6 @@ static int update_size(AVCodecContext *avctx, int w, int h)
|
|||||||
|
|
||||||
switch (s->pix_fmt) {
|
switch (s->pix_fmt) {
|
||||||
case AV_PIX_FMT_YUV420P:
|
case AV_PIX_FMT_YUV420P:
|
||||||
#if CONFIG_VP9_VDPAU_HWACCEL
|
|
||||||
*fmtp++ = AV_PIX_FMT_VDPAU;
|
|
||||||
#endif
|
|
||||||
case AV_PIX_FMT_YUV420P10:
|
case AV_PIX_FMT_YUV420P10:
|
||||||
#if CONFIG_VP9_DXVA2_HWACCEL
|
#if CONFIG_VP9_DXVA2_HWACCEL
|
||||||
*fmtp++ = AV_PIX_FMT_DXVA2_VLD;
|
*fmtp++ = AV_PIX_FMT_DXVA2_VLD;
|
||||||
|
Reference in New Issue
Block a user