56 if( arg.length() > 255 )
70 return (sz > 0 && nelem < UINT_MAX / sz);
92 if (path.length() > 255)
95 BESRegex name(
"[[:alpha:][:digit:]_./-]+");
99 string::size_type len = path.length() ;
100 int ret = name.
match( path.c_str(), len ) ;
101 if( ret !=
static_cast<int>(len) )
int match(const char *s, int len, int pos=0)
Does the pattern match.
static bool size_ok(unsigned int sz, unsigned int nelem)
sanitize the size of an array. Test for integer overflow when dynamically allocating an array.
static bool pathname_ok(const std::string &path, bool strict)
Does the string name a potentailly valid pathname? Test the given pathname to verfiy that it is a val...
static bool command_line_arg_ok(const std::string &arg)
sanitize command line arguments