From 8156345dfec385d3fd394acb7ef9f78aca35f003 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 6 Mar 2015 13:19:02 -0700 Subject: sandbox: Move CONFIG_SYS_VSNPRINTF to Kconfig Move this over to Kconfig and tidy up. Signed-off-by: Simon Glass --- lib/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') diff --git a/lib/Kconfig b/lib/Kconfig index c9d2767d1d..d7fd21928d 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -27,6 +27,15 @@ config SYS_HZ get_timer() must operate in milliseconds and this option must be set to 1000. +config SYS_VSNPRINTF + bool "Enable safe version of sprintf()" + help + Since sprintf() can overflow its buffer, it is common to use + snprintf() instead, which knows the buffer size and can avoid + overflow. However, this does increase code size slightly (for + Thumb-2, about 420 bytes). Enable this option for safety when + using sprintf() with data you do not control. + source lib/rsa/Kconfig menu "Hashing Support" -- cgit v1.2.3