OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f44d50a
)
swscale: fix crash in 8-bpc bilinear output without alpha.
author
Ronald S. Bultje
<rsbultje@gmail.com>
Fri, 8 Jul 2011 19:28:28 +0000
(12:28 -0700)
committer
Ronald S. Bultje
<rsbultje@gmail.com>
Fri, 8 Jul 2011 22:15:30 +0000
(15:15 -0700)
We accessed the alpha array even it wasn't used and didn't
exist, hence leading to a NULL pointer segfault.
libswscale/swscale.c
patch
|
blob
|
history
diff --git
a/libswscale/swscale.c
b/libswscale/swscale.c
index
a302373
..
527dd80
100644
(file)
--- a/
libswscale/swscale.c
+++ b/
libswscale/swscale.c
@@
-1136,7
+1136,8
@@
yuv2rgb_2_c_template(SwsContext *c, const int16_t *buf[2],
const int16_t *buf0 = buf[0], *buf1 = buf[1],
*ubuf0 = ubuf[0], *ubuf1 = ubuf[1],
*vbuf0 = vbuf[0], *vbuf1 = vbuf[1],
- *abuf0 = abuf[0], *abuf1 = abuf[1];
+ *abuf0 = hasAlpha ? abuf[0] : NULL,
+ *abuf1 = hasAlpha ? abuf[1] : NULL;
int yalpha1 = 4095 - yalpha;
int uvalpha1 = 4095 - uvalpha;
int i;