19 lines
560 B
Diff
19 lines
560 B
Diff
|
--- pegasus/src/Pegasus/Common/System.cpp.PATH_MAX 2006-01-30 11:17:08.000000000 -0500
|
||
|
+++ pegasus/src/Pegasus/Common/System.cpp 2006-04-14 18:19:27.000000000 -0400
|
||
|
@@ -185,13 +185,13 @@
|
||
|
char *System::extract_file_path(const char *fullpath, char *dirname)
|
||
|
{
|
||
|
char *p;
|
||
|
- char buff[2048];
|
||
|
+ char buff[PATH_MAX];
|
||
|
if (fullpath == NULL)
|
||
|
{
|
||
|
dirname[0] = '\0';
|
||
|
return dirname;
|
||
|
}
|
||
|
- strcpy(buff, fullpath);
|
||
|
+ strncpy(buff, fullpath, PATH_MAX);
|
||
|
for(p = buff + strlen(buff); p >= buff; p--)
|
||
|
{
|
||
|
if (*p == '\\' || *p == '/')
|