From 7831c4bfef2c340de01ff08461bd7f6a0e54ce32 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 18 Apr 2014 00:14:12 -0700 Subject: Cleanup, dead code removal, some pretty insignificant security stuff that's based on recommendations. --- node/Utils.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'node/Utils.cpp') diff --git a/node/Utils.cpp b/node/Utils.cpp index 95b66337..0b1677e1 100644 --- a/node/Utils.cpp +++ b/node/Utils.cpp @@ -395,22 +395,6 @@ std::string Utils::trim(const std::string &s) return s.substr(start,end - start); } -void Utils::stdsprintf(std::string &s,const char *fmt,...) - throw(std::bad_alloc,std::length_error) -{ - char buf[65536]; - va_list ap; - - va_start(ap,fmt); - int n = vsnprintf(buf,sizeof(buf),fmt,ap); - va_end(ap); - - if ((n >= (int)sizeof(buf))||(n < 0)) - throw std::length_error("printf result too large"); - - s.append(buf); -} - unsigned int Utils::snprintf(char *buf,unsigned int len,const char *fmt,...) throw(std::length_error) { -- cgit v1.2.3