From: Bas Nieuwenhuizen Date: Tue, 4 Jun 2019 21:19:27 +0000 (+0200) Subject: freedreno: Add printf pattern string. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a6a5a6f67f8d1dfe3d230deccf9e1dc6cfb7c71e;p=mesa.git 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 --- 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: