git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
389d453
)
swscale/input: fix harmless integer overflow
author
Michael Niedermayer
<michaelni@gmx.at>
Mon, 16 Jun 2014 20:46:46 +0000
(22:46 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Mon, 16 Jun 2014 21:28:32 +0000
(23:28 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswscale/input.c
patch
|
blob
|
history
diff --git
a/libswscale/input.c
b/libswscale/input.c
index
3a2a124
..
6a39a30
100644
(file)
--- a/
libswscale/input.c
+++ b/
libswscale/input.c
@@
-324,8
+324,8
@@
static av_always_inline void rgb16_32ToUV_half_c_template(int16_t *dstU,
maskb |= maskb << 1;
maskg |= maskg << 1;
for (i = 0; i < width; i++) {
-
int
px0 = input_pixel(2 * i + 0) >> shp;
-
int
px1 = input_pixel(2 * i + 1) >> shp;
+
unsigned
px0 = input_pixel(2 * i + 0) >> shp;
+
unsigned
px1 = input_pixel(2 * i + 1) >> shp;
int b, r, g = (px0 & maskgx) + (px1 & maskgx);
int rb = px0 + px1 - g;