flash: psoc4: fix clang error

Clang 15.0.7 complains about snprintf output truncation due to
output between 13 and 22 bytes into a destination of size 20.

Increase the size of the buffer.

Change-Id: I0369255ca1bc02a0cf494f765e91a608c960a0d6
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7717
Tested-by: jenkins
This commit is contained in:
Antonio Borneo 2023-05-27 15:56:44 +02:00
parent 72131e05e9
commit 00603bf156
1 changed files with 1 additions and 1 deletions

View File

@ -779,7 +779,7 @@ static int psoc4_probe(struct flash_bank *bank)
flash_size_in_kb = psoc4_info->user_bank_size / 1024;
}
char macros_txt[20] = "";
char macros_txt[22] = "";
if (num_macros > 1)
snprintf(macros_txt, sizeof(macros_txt), " in %" PRIu32 " macros", num_macros);