From 2cd73ca60234748a15b74a2c346778fcb4f4ee61 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 3 Mar 2022 16:53:22 -0800 Subject: Add host string descriptor functions Plus typo fixes, GCC11 array bounds fix, snprintf for malloc-free debug and pragmas for alignment checks. --- src/common/tusb_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/tusb_common.h b/src/common/tusb_common.h index 9b9e2b007..80bb40f77 100644 --- a/src/common/tusb_common.h +++ b/src/common/tusb_common.h @@ -349,7 +349,7 @@ static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint3 } // not found return the key value in hex - sprintf(not_found, "0x%08lX", (unsigned long) key); + snprintf(not_found, sizeof(not_found), "0x%08lX", (unsigned long) key); return not_found; } -- cgit v1.3.1