vlc | branch: master | Steve Lhomme <rob...@ycbcr.xyz> | Mon Feb 12 14:24:20 
2018 +0100| [92c069befeef7d19ccdcf73adadad5e1fde73cd5] | committer: Steve Lhomme

d3d11_fmt: make sure we don't try to use an array size bigger than what we have

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=92c069befeef7d19ccdcf73adadad5e1fde73cd5
---

 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++)
     {

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to