[SCM] BOINC packaging branch, master, updated. debian/7.0.33+dfsg-1-68-g4eb9fe1
Steffen Moeller
steffen_moeller at gmx.de
Sat Oct 20 23:14:58 UTC 2012
The following commit has been merged in the master branch:
commit c1ce00eadb9c468e656360b6fcd32957a604b8ec
Author: Steffen Moeller <steffen_moeller at gmx.de>
Date: Sun Oct 7 17:32:05 2012 +0200
Corrected more pathlengths.
diff --git a/debian/patches/client_app_maxpathlen.patch b/debian/patches/client_app_maxpathlen.patch
index f9843c2..ae54e11 100644
--- a/debian/patches/client_app_maxpathlen.patch
+++ b/debian/patches/client_app_maxpathlen.patch
@@ -1,7 +1,7 @@
Index: boinc/client/app.cpp
===================================================================
---- boinc.orig/client/app.cpp 2012-09-21 10:58:21.897244071 +0200
-+++ boinc/client/app.cpp 2012-09-21 11:03:35.916996798 +0200
+--- boinc.orig/client/app.cpp
++++ boinc/client/app.cpp
@@ -413,7 +413,7 @@
// Move it from slot dir to project dir
//
@@ -11,3 +11,116 @@ Index: boinc/client/app.cpp
int retval;
get_project_dir(result->project, project_dir, sizeof(project_dir));
+Index: boinc/client/app.h
+===================================================================
+--- boinc.orig/client/app.h
++++ boinc/client/app.h
+@@ -47,7 +47,7 @@
+ typedef int PROCESS_ID;
+
+ #define MAX_STDERR_LEN 65536
+-#define SLOT_DIR_LEN 256
++#define SLOT_DIR_LEN MAXPATHLEN
+ // The stderr output of an application is truncated to this length
+ // before sending to server,
+ // to protect against apps that write unbounded amounts.
+Index: boinc/client/file_names.cpp
+===================================================================
+--- boinc.orig/client/file_names.cpp
++++ boinc/client/file_names.cpp
+@@ -66,7 +66,7 @@
+ }
+
+ void get_project_dir(PROJECT* p, char* path, int len) {
+- char buf[1024];
++ char buf[max(len,MAXPATHLEN)];
+ escape_project_url(p->master_url, buf);
+ snprintf(path, len, "%s/%s", PROJECTS_DIR, buf);
+ }
+@@ -75,7 +75,7 @@
+ //
+ void get_pathname(FILE_INFO* fip, char* path, int len) {
+ PROJECT* p = fip->project;
+- char buf[1024];
++ char buf[max(len,MAXPATHLEN)];
+
+ // for testing purposes, it's handy to allow a FILE_INFO without
+ // an associated PROJECT.
+@@ -97,28 +97,28 @@
+ }
+
+ void get_sched_request_filename(PROJECT& project, char* buf, int len) {
+- char url[1024];
++ char url[max(len,MAXPATHLEN)];
+
+ escape_project_url(project.master_url, url);
+ snprintf(buf, len, "%s%s.xml", SCHED_OP_REQUEST_BASE, url);
+ }
+
+ void get_sched_reply_filename(PROJECT& project, char* buf, int len) {
+- char url[1024];
++ char url[max(len,MAXPATHLEN)];
+
+ escape_project_url(project.master_url, url);
+ snprintf(buf, len, "%s%s.xml", SCHED_OP_REPLY_BASE, url);
+ }
+
+ void get_master_filename(PROJECT& project, char* buf, int len) {
+- char url[1024];
++ char url[max(len,MAXPATHLEN)];
+
+ escape_project_url(project.master_url, url);
+ snprintf(buf, len, "%s%s.xml", MASTER_BASE, url);
+ }
+
+ void job_log_filename(PROJECT& project, char* buf, int len) {
+- char url[1024];
++ char url[max(len,MAXPATHLEN)];
+
+ escape_project_url(project.master_url, url);
+ snprintf(buf, len, "%s%s.txt", JOB_LOG_BASE, url);
+@@ -133,7 +133,7 @@
+ // Create the directory for the project p
+ //
+ int make_project_dir(PROJECT& p) {
+- char buf[1024];
++ char buf[MAXPATHLEN];
+ int retval;
+
+ boinc_mkdir(PROJECTS_DIR);
+@@ -171,7 +171,7 @@
+ }
+
+ int remove_project_dir(PROJECT& p) {
+- char buf[1024];
++ char buf[MAXPATHLEN];
+ int retval;
+
+ get_project_dir(&p, buf, sizeof(buf));
+@@ -186,7 +186,7 @@
+ // Create the slot directory for the specified slot #
+ //
+ int make_slot_dir(int slot) {
+- char buf[1024];
++ char buf[MAXPATHLEN];
+
+ if (slot<0) {
+ msg_printf(NULL, MSG_INTERNAL_ERROR, "Bad slot number %d", slot);
+@@ -230,7 +230,7 @@
+ // delete unused stuff in the slots/ directory
+ //
+ void delete_old_slot_dirs() {
+- char filename[1024], path[MAXPATHLEN];
++ char filename[MAXPATHLEN], path[MAXPATHLEN];
+ DIRREF dirp;
+ int retval;
+
+@@ -339,7 +339,7 @@
+ }
+
+ void boinc_version_dir(PROJECT& p, VERSION_INFO& vi, char* buf) {
+- char projdir[1024];
++ char projdir[MAXPATHLEN];
+ get_project_dir(&p, projdir, sizeof(projdir));
+ sprintf(buf, "%s/boinc_version_%d_%d_%d", projdir, vi.major, vi.minor, vi.release);
+ }
--
BOINC packaging
More information about the pkg-boinc-commits
mailing list