Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2:PowerPC
boinc-client
boinc-client-dynamic_buffers.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File boinc-client-dynamic_buffers.patch of Package boinc-client
Index: lib/filesys.cpp =================================================================== --- lib/filesys.cpp.orig +++ lib/filesys.cpp @@ -46,6 +46,7 @@ #include <sys/time.h> #include <unistd.h> #include <dirent.h> +#include <climits> #ifdef HAVE_SYS_RESOURCE_H #include <sys/resource.h> @@ -400,7 +401,8 @@ int dir_size(const char* dirpath, double } while (FindNextFileA(hFind, &findData)); ::FindClose(hFind); #else - char filename[256], subdir[256]; + char filename[PATH_MAX]; + char *subdir; int retval=0; DIRREF dirp; double x; @@ -411,7 +413,7 @@ int dir_size(const char* dirpath, double while (1) { retval = dir_scan(filename, dirp, sizeof(filename)); if (retval) break; - sprintf(subdir, "%s/%s", dirpath, filename); + asprintf(&subdir, "%s/%s", dirpath, filename); if (is_dir(subdir)) { if (recurse) { @@ -424,6 +426,9 @@ int dir_size(const char* dirpath, double if (retval) continue; size += x; } + + if(subdir != NULL) + free(subdir); } dir_close(dirp); #endif
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor