
Hello, On Sun, 01 May 2011, Sascha Manns wrote:
i've got a bugreport for the boinc-client package: https://bugzilla.novell.com/show_bug.cgi?id=689499.
Maybe anyone can help me with this bug? I have searched the whole Packaging Sources, but doesn't found anything and haven't any idea.
So it would be great, if anyone can help.
Have a nice Rest Weekend. :-) Sascha
==== lib/filesys.cpp:349 ==== int dir_size(const char* dirpath, double& size, bool recurse) { #ifdef WIN32 char path2[_MAX_PATH]; sprintf(path2, "%s/*", dirpath); [.. : 373] #else char filename[256], subdir[256]; int retval=0; DIRREF dirp; double x; size = 0; dirp = dir_open(dirpath); if (!dirp) return ERR_OPENDIR; while (1) { retval = dir_scan(filename, dirp, sizeof(filename)); if (retval) break; sprintf(subdir, "%s/%s", dirpath, filename); ==== dirpath and filename are written to subdir withouth any check, and subdir is a mere 255 bytes long, filename alone can be the same size. Just a crude idea: ==== Top of file: ==== #ifndef _POSIX_SOURCE #define _POSIX_SOURCE 1 #endif #include <limits.h> #include <errno.h> [..: former line 373] #else char filename[NAME_MAX], subdir[PATH_MAX]; [..] if (retval) break; retval = snprintf(subdir, PATH_MAX-2, "%s/%s", dirpath, filename); if(retval >= PATH_MAX-2) { errno = ENAMETOOLONG; perror(""); /* oder so ähnlich */ break; } [..] ==== Someone who knows C better should check that though. AFAIK the limit of PATH_MAX-2 ('/' + '\0' + dirpath (w/o '\0') + filename (w/o '\0')) should be ok, but ... HTH, -dnh -- In /etc is what you think. In /proc is, what the OS thinks. -- Thomas Blum in doc -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org