[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
Mon Feb 12 17:14:26 CET 2018


vlc | branch: master | Steve Lhomme <robux4 at 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++)
     {



More information about the vlc-commits mailing list