From af6dccd6e62a44de53025741aad09caffa7ecfa2 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Fri, 24 Mar 2023 00:23:42 +0900 Subject: [PATCH] d3d11bufferpool: Fix invalid access in debug print loop Add missing condition check in for loop Part-of: --- .../gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11bufferpool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11bufferpool.cpp b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11bufferpool.cpp index 785fd72bad..47669e4f6d 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11bufferpool.cpp +++ b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11bufferpool.cpp @@ -206,7 +206,7 @@ gst_d3d11_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config) GST_LOG_OBJECT (self, "Direct3D11 Allocation params"); GST_LOG_OBJECT (self, "\tD3D11AllocationFlags: 0x%x", priv->d3d11_params->flags); - for (i = 0; GST_VIDEO_MAX_PLANES; i++) { + for (i = 0; i < GST_VIDEO_MAX_PLANES; i++) { if (desc[i].Format == DXGI_FORMAT_UNKNOWN) break; GST_LOG_OBJECT (self, "\t[plane %d] %dx%d, DXGI format %d",