[vlc-commits] d3d11_fmt: make sure we don't try to use an array size bigger than what we have
Steve Lhomme
git at videolan.org
Tue Feb 13 11:38:27 CET 2018
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Feb 12 14:24:20 2018 +0100| [0b98f9b2a75300658e5d3acd1c8c1d42e8bf5e8a] | committer: Hugo Beauzée-Luyssen
d3d11_fmt: make sure we don't try to use an array size bigger than what we have
(cherry picked from commit 92c069befeef7d19ccdcf73adadad5e1fde73cd5)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=0b98f9b2a75300658e5d3acd1c8c1d42e8bf5e8a
---
modules/video_chroma/d3d11_fmt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c
index 5a321e395d..09e22ab63c 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -105,6 +105,7 @@ int AllocateShaderView(vlc_object_t *obj, ID3D11Device *d3ddevice,
resviewDesc.Texture2DArray.MipLevels = -1;
resviewDesc.Texture2DArray.ArraySize = 1;
resviewDesc.Texture2DArray.FirstArraySlice = slice_index;
+ assert(slice_index < texDesc.ArraySize);
}
for (i=0; i<D3D11_MAX_SHADER_VIEW; i++)
{
More information about the vlc-commits
mailing list