From becec522c4a37e71dbe08b1395ef77de2fb77949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Wed, 15 Aug 2018 11:09:49 +0200 Subject: [PATCH] wined3d: Use snprintf() in shader_arb_request_a0() (Coverity). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/arb_program_shader.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index c05dca0046a..00b326fcee5 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -987,9 +987,10 @@ static void shader_arb_request_a0(const struct wined3d_shader_instruction *ins, struct shader_arb_ctx_priv *priv = ins->ctx->backend_data; struct wined3d_string_buffer *buffer = ins->ctx->buffer; - if (!strcmp(priv->addr_reg, src)) return; + if (!strcmp(priv->addr_reg, src)) + return; - strcpy(priv->addr_reg, src); + snprintf(priv->addr_reg, sizeof(priv->addr_reg), "%s", src); shader_addline(buffer, "ARL A0.x, %s;\n", src); }