From 0376e1a79a20dd69352290b466acf245e8d4f054 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 7 Jun 2018 10:30:01 +1000 Subject: [PATCH] ac: fix possible truncation of intrinsic name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the gcc warning: snprintf’ output between 26 and 33 bytes into a destination of size 32 Fixes: d5f7ebda3ec0 ("ac: add LLVM build functions for subgroup instrinsics") Reviewed-by: Bas Nieuwenhuizen (cherry picked from commit fae3b38770cc524d28368b2287264668ce4e3e46) --- src/amd/common/ac_llvm_build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index f21a5d2623c..8c2bc475aa3 100644 --- a/src/amd/common/ac_llvm_build.c +++ b/src/amd/common/ac_llvm_build.c @@ -2866,7 +2866,7 @@ static LLVMValueRef ac_build_set_inactive(struct ac_llvm_context *ctx, LLVMValueRef src, LLVMValueRef inactive) { - char name[32], type[8]; + char name[33], type[8]; LLVMTypeRef src_type = LLVMTypeOf(src); src = ac_to_integer(ctx, src); inactive = ac_to_integer(ctx, inactive);