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