// Author: Julian Smart
// Modified by:
// Created: 29/01/98
-// RCS-ID: $Id$
// Copyright: (c) 1998 Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
{
static wxChar buf[_MAXPATHLEN];
- // Local copy
- wxStrcpy (buf, path);
-
int l = wxStrlen(path);
int i = l - 1;
+ if ( i >= _MAXPATHLEN )
+ return NULL;
+
+ // Local copy
+ wxStrcpy (buf, path);
// Search backward for a backward or forward slash
while (i > -1)
{
wxChar buf[_MAXPATHLEN];
- // Local copy
- wxStrcpy(buf, path);
-
int l = path.length();
int i = l - 1;
+ if ( i >= _MAXPATHLEN )
+ return wxString();
+
+ // Local copy
+ wxStrcpy(buf, path);
+
// Search backward for a backward or forward slash
while (i > -1)
{
buf = new wxChar[sz + 1];
}
- bool ok wxDUMMY_INITIALIZE(false);
+ bool ok = false;
// for the compilers which have Unicode version of _getcwd(), call it
// directly, for the others call the ANSI version and do the translation