54 if( arg.length() > 255 )
68 return (sz > 0 && nelem < UINT_MAX / sz);
90 if (path.length() > 255)
93 BESRegex name(
"[[:alpha:][:digit:]_./-]+");
97 string::size_type len = path.length() ;
98 int ret = name.
match( path.c_str(), len ) ;
99 if( ret != static_cast<int>(len) )
static bool pathname_ok(const string &path, bool strict)
Does the string name a potentailly valid pathname? Test the given pathname to verfiy that it is a val...
int match(const char *s, int len, int pos=0)
Does the pattern match.
static bool command_line_arg_ok(const string &arg)
sanitize command line arguments
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...