We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09deafb commit 88e512cCopy full SHA for 88e512c
src/clutils/dirobj.cc
@@ -257,10 +257,11 @@ std::string DirObj::Normalize( const std::string & path ) {
257
const char * DirObj::ValidDirectories( const char * path ) {
258
#ifdef _WIN32
259
static char buf[MAX_PATH + 1];
260
+ strncpy(buf, path, MAX_PATH);
261
#else
262
static char buf[MAXPATHLEN + 1];
263
+ strncpy(buf, path, MAXPATHLEN);
264
#endif
- strcpy( buf, path );
265
int i = strlen( path );
266
267
while( !IsADirectory( RealPath( buf ) ) && i >= 0 ) {
0 commit comments