From: Kees Cook Date: Wed, 24 Apr 2024 16:27:39 +0000 (-0700) Subject: ubsan: Remove 1-element array usage in debug reporting X-Git-Tag: block-6.10-20240523~22^2~19 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=c209826737b733b4ccd38448d7b025bb128aaa8a;p=linux-block.git ubsan: Remove 1-element array usage in debug reporting The "type_name" character array was still marked as a 1-element array. While we don't validate strings used in format arguments yet, let's fix this before it causes trouble some future day. Link: https://lore.kernel.org/r/20240424162739.work.492-kees@kernel.org Reviewed-by: Gustavo A. R. Silva Signed-off-by: Kees Cook --- diff --git a/lib/ubsan.h b/lib/ubsan.h index 0abbbac8700d..50ef50811b7c 100644 --- a/lib/ubsan.h +++ b/lib/ubsan.h @@ -43,7 +43,7 @@ enum { struct type_descriptor { u16 type_kind; u16 type_info; - char type_name[1]; + char type_name[]; }; struct source_location {