vlc/vlc-3.0 | branch: master | Steve Lhomme <rob...@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 <h...@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++)
     {

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

Reply via email to