1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

swscale/output: fix null pointer dereference in yuv2ya8_2_c()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-07-03 23:03:25 +02:00
parent 3b03186d56
commit ab80d3fb3a

View File

@ -1949,7 +1949,7 @@ yuv2ya8_2_c(SwsContext *c, const int16_t *buf[2],
const int16_t *abuf[2], uint8_t *dest, int dstW,
int yalpha, int uvalpha, int y)
{
int hasAlpha = abuf[0] && abuf[1];
int hasAlpha = abuf && abuf[0] && abuf[1];
const int16_t *buf0 = buf[0], *buf1 = buf[1],
*abuf0 = hasAlpha ? abuf[0] : NULL,
*abuf1 = hasAlpha ? abuf[1] : NULL;