From b845301df8b1069dc2870cece425f5d8e2b37593 Mon Sep 17 00:00:00 2001 From: "markus@chromium.org" Date: Thu, 5 Sep 2013 00:43:51 +0000 Subject: Second attempt at introducing SafeSPrintf(). See original discussion at https://codereview.chromium.org/18656004/ Reverted as: https://codereview.chromium.org/23463010/ Added a new base::strings::SafeSPrintf() function that can safely be called from all restricted (e.g. async-signal-safe) environments. It is roughly equivalent to snprintf(). But it is easier to use, as it uses C++ to be type-safe. In release builds, this function is guaranteed to never call any other library function nor any system calls. In debug builds, we call RAW_CHECK() in some circumstances. This code is needed for (at least) the seccomp sandbox and to clean up code in the stack tracer. Those changes are pending and will be submitted as separate CLs. BUG=285499 TEST=base_unittests TBR=willchan@chromium.org NOTRY=true Review URL: https://chromiumcodereview.appspot.com/23777003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221322 0039d316-1c4b-4281-b951-d872f2087c98 --- base/base.gypi | 2 ++ 1 file changed, 2 insertions(+) (limited to 'base/base.gypi') diff --git a/base/base.gypi b/base/base.gypi index 2bd7161..d34b39d 100644 --- a/base/base.gypi +++ b/base/base.gypi @@ -475,6 +475,8 @@ 'strings/latin1_string_conversions.h', 'strings/nullable_string16.cc', 'strings/nullable_string16.h', + 'strings/safe_sprintf.cc', + 'strings/safe_sprintf.h', 'strings/string16.cc', 'strings/string16.h', 'strings/string_number_conversions.cc', -- cgit v1.1