diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-07-03 23:03:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-07-03 23:03:25 +0200 |
commit | ab80d3fb3a7595db44fc143c80f8c2a3480fe28d (patch) | |
tree | df8ec4936ced05af3fe30774cc2190ef848b9148 /libswscale/output.c | |
parent | 3b03186d56794b902050a36516e44191ba07bb05 (diff) | |
download | ffmpeg-ab80d3fb3a7595db44fc143c80f8c2a3480fe28d.tar.gz |
swscale/output: fix null pointer dereference in yuv2ya8_2_c()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/output.c')
-rw-r--r-- | libswscale/output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libswscale/output.c b/libswscale/output.c index 09e3369ffc..582eb5b909 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -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; |