From a6a5a6f67f8d1dfe3d230deccf9e1dc6cfb7c71e Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Tue, 4 Jun 2019 23:19:27 +0200 Subject: [PATCH] freedreno: Add printf pattern string. Some new flag setting disallows it due to being a security risk. Fixes: c9c1e261064 "mesa: prevent common string formatting security issues" Reviewed-by: Rob Clark --- src/gallium/drivers/freedreno/freedreno_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 686a930f494..12488ef9082 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -607,7 +607,7 @@ fd_get_compute_param(struct pipe_screen *pscreen, enum pipe_shader_ir ir_type, case PIPE_COMPUTE_CAP_IR_TARGET: if (ret) - sprintf(ret, ir); + sprintf(ret, "%s", ir); return strlen(ir) * sizeof(char); case PIPE_COMPUTE_CAP_GRID_DIMENSION: -- 2.30.2