[vlc-commits] d3d11_quad: fix buffer overrun
Steve Lhomme
git at videolan.org
Mon Oct 22 11:57:27 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Oct 22 11:57:02 2018 +0200| [23e5d8de7c216444317e4f9dd93714b76f27c0a9] | committer: Steve Lhomme
d3d11_quad: fix buffer overrun
CID #322961
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=23e5d8de7c216444317e4f9dd93714b76f27c0a9
---
modules/video_output/win32/d3d11_quad.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/win32/d3d11_quad.c b/modules/video_output/win32/d3d11_quad.c
index e46af4ffbc..6a61f8a705 100644
--- a/modules/video_output/win32/d3d11_quad.c
+++ b/modules/video_output/win32/d3d11_quad.c
@@ -884,12 +884,14 @@ static void GetPrimariesTransform(FLOAT Primaries[4*4], video_color_primaries_t
/* src[RGB] -> src[XYZ] -> dst[XYZ] -> dst[RGB] */
Float3x3Multiply(xyz2rgb, rgb2xyz);
- for (size_t i=0;i<4; ++i)
+ for (size_t i=0;i<3; ++i)
{
for (size_t j=0;j<3; ++j)
Primaries[j + i*4] = xyz2rgb[j + i*3];
- Primaries[3 + i*4] = i == 3;
+ Primaries[3 + i*4] = 0;
}
+ for (size_t j=0;j<4; ++j)
+ Primaries[j + 3*4] = j == 3;
}
#undef D3D11_SetupQuad
More information about the vlc-commits
mailing list