[SCM] BOINC packaging branch, master, updated. debian/7.0.33+dfsg-1-6-g244f70b
Steffen Moeller
steffen_moeller at gmx.de
Wed Aug 22 21:58:48 UTC 2012
The following commit has been merged in the master branch:
commit 1b1224ed8b576e0b65c4b78c06139dc2148e9b9e
Author: Steffen Moeller <steffen_moeller at gmx.de>
Date: Wed Aug 22 20:36:57 2012 +0200
Preparing for upload of 7.0.34
diff --git a/debian/changelog b/debian/changelog
index 7aa242f..6663d07 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-boinc (7.0.34+dfsg-1) UNRELEASED; urgency=low
+boinc (7.0.34+dfsg-1) unstable; urgency=low
[ Steffen Moeller ]
* New upstream version
@@ -7,7 +7,7 @@ boinc (7.0.34+dfsg-1) UNRELEASED; urgency=low
- api loses supports for legacy image formats
- switch from *.txf fonts to TrueType fonts in graphics apps,
ensuring that all related files have no licensing issues.
- * Helping boinc's cuda package towards multiarch
+ * Helping boinc-nvidia-cuda package towards multi-arch
[ Guo Yixuan ]
* Remove broken links from libboinc-app-dev. (Closes: #659845)
diff --git a/debian/patches/more_maxpathlen.patch b/debian/patches/more_maxpathlen.patch
new file mode 100644
index 0000000..980e50d
--- /dev/null
+++ b/debian/patches/more_maxpathlen.patch
@@ -0,0 +1,152 @@
+Index: boinc/api/graphics2_util.cpp
+===================================================================
+--- boinc.orig/api/graphics2_util.cpp 2012-03-31 13:44:20.927194759 +0200
++++ boinc/api/graphics2_util.cpp 2012-08-18 22:06:59.095703443 +0200
+@@ -35,9 +35,9 @@
+
+ #ifdef __EMX__
+ static key_t get_shmem_name(const char* prog_name) {
+- char cwd[256], path[256];
++ char cwd[MATPATHLEN], path[MATPATHLEN];
+ boinc_getcwd(cwd);
+- sprintf(path, "%s/init_data.xml", cwd);
++ snprintf(path, sizeof(path), "%s/init_data.xml", cwd);
+ return ftok(path, 2);
+ }
+ #else
+@@ -47,14 +47,14 @@
+ APP_INIT_DATA aid;
+ int retval = boinc_get_init_data(aid);
+ if (retval) aid.slot = 0;
+- sprintf(shmem_name, "boinc_%s_%d", prog_name, aid.slot);
++ snprintf(shmem_name, sizeof(shmem_name), "boinc_%s_%d", prog_name, aid.slot);
+ }
+ #endif
+
+ void* boinc_graphics_make_shmem(const char* prog_name, int size) {
+ #ifdef _WIN32
+ HANDLE shmem_handle;
+- char shmem_name[256];
++ char shmem_name[MATPATHLEN];
+ void* p;
+ get_shmem_name(prog_name, shmem_name);
+ shmem_handle = create_shmem(shmem_name, size, &p);
+@@ -67,7 +67,7 @@
+ int retval = create_shmem(key, size, 0, &p);
+ #else
+ // V6 Unix/Linux/Mac applications always use mmap() shared memory for graphics communication
+- char shmem_name[256];
++ char shmem_name[MATPATHLEN];
+ get_shmem_name(prog_name, shmem_name);
+ int retval = create_shmem_mmap(shmem_name, size, &p);
+ // Graphics app may be run by a different user & group than worker app
+@@ -82,7 +82,7 @@
+ #ifdef _WIN32
+ void* boinc_graphics_get_shmem(const char* prog_name) {
+ HANDLE shmem_handle;
+- char shmem_name[256];
++ char shmem_name[MATPATHLEN];
+ void* p;
+ get_shmem_name(prog_name, shmem_name);
+ shmem_handle = attach_shmem(shmem_name, &p);
+@@ -100,7 +100,7 @@
+ retval = attach_shmem(key, &p);
+ #else
+ // V6 Unix/Linux/Mac applications always use mmap() shared memory for graphics communication
+- char shmem_name[256];
++ char shmem_name[MATPATHLEN];
+ get_shmem_name(prog_name, shmem_name);
+ retval = attach_shmem_mmap(shmem_name, &p);
+ #endif
+Index: boinc/lib/filesys.cpp
+===================================================================
+--- boinc.orig/lib/filesys.cpp 2012-08-18 16:00:23.485826204 +0200
++++ boinc/lib/filesys.cpp 2012-08-18 22:23:33.110256806 +0200
+@@ -209,7 +209,7 @@
+ }
+
+ bool is_dir_empty(const char *p) {
+- char file[256];
++ char file[MAXPATHLEN];
+
+ DIRREF dir = dir_open(p);
+ if (!dir) return true;
+@@ -430,7 +430,7 @@
+ while (1) {
+ retval = dir_scan(filename, dirp, sizeof(filename));
+ if (retval) break;
+- sprintf(subdir, "%s/%s", dirpath, filename);
++ snprintf(subdir, sizeof(subdir), "%s/%s", dirpath, filename);
+
+ if (is_dir(subdir)) {
+ if (recurse) {
+@@ -548,8 +548,8 @@
+ }
+ return 0;
+ #elif defined(__EMX__)
+- char cmd[1024];
+- sprintf(cmd, "copy \"%s\" \"%s\"", orig, newf);
++ char cmd[2*MAXPATHLEN+5];
++ snprintf(cmd, sizeof(cmd), "copy \"%s\" \"%s\"", orig, newf);
+ return system(cmd);
+ #else
+ // POSIX requires that shells run from an application will use the
+@@ -659,11 +659,11 @@
+ // create directories dirpath/a, dirpath/a/b etc.
+ //
+ int boinc_make_dirs(const char* dirpath, const char* filepath) {
+- char buf[1024], oldpath[1024], newpath[1024];
++ char buf[MAXPATHLEN*2], oldpath[MAXPATHLEN], newpath[MAXPATHLEN];
+ int retval;
+ char *p, *q;
+
+- if (strlen(filepath) + strlen(dirpath) > 1023) return ERR_BUFFER_OVERFLOW;
++ if (strlen(filepath) + strlen(dirpath) > sizeof(buf)-1) return ERR_BUFFER_OVERFLOW;
+ strcpy(buf, filepath);
+ strcpy(oldpath, dirpath);
+
+@@ -672,7 +672,7 @@
+ p = strchr(q, '/');
+ if (!p) break;
+ *p = 0;
+- sprintf(newpath, "%s/%s", oldpath, q);
++ snprintf(newpath, sizeof(newpath), "%s/%s", oldpath, q);
+ retval = boinc_mkdir(newpath);
+ if (retval) return retval;
+ strcpy(oldpath, newpath);
+Index: boinc/lib/network.cpp
+===================================================================
+--- boinc.orig/lib/network.cpp 2012-08-01 20:52:04.638985631 +0200
++++ boinc/lib/network.cpp 2012-08-18 22:30:17.052799909 +0200
+@@ -70,7 +70,7 @@
+ case WSAENOTSOCK:
+ return "not a socket";
+ }
+- sprintf(buf, "error %d", e);
++ snprintf(buf, sizeof(buf), "error %d", e);
+ return buf;
+ #else
+ switch (h_errno) {
+@@ -84,11 +84,11 @@
+ return "host not found or server failure";
+ #ifdef NETDB_INTERNAL
+ case NETDB_INTERNAL:
+- sprintf(buf,"network internal error %d",errno);
++ snprintf(buf, sizeof(buf), "network internal error %d",errno);
+ return buf;
+ #endif
+ }
+- sprintf(buf, "error %d", h_errno);
++ snprintf(buf, sizeof(buf), "error %d", h_errno);
+ return buf;
+ #endif
+ }
+@@ -108,7 +108,7 @@
+ {
+ sockaddr_in6* sin = (sockaddr_in6*)&s;
+ char buf[256];
+- inet_ntop(AF_INET6, (void*)(&sin->sin6_addr), buf, 256);
++ inet_ntop(AF_INET6, (void*)(&sin->sin6_addr), buf, sizeof(buf));
+ return (strcmp(buf, "::1") == 0);
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
index 61399cb..6b1d60a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -66,3 +66,4 @@ add_hardening_flags.patch
cmath_missing.patch
investigate_boinc_api.patch
opendir_error_messages.patch
+more_maxpathlen.patch
--
BOINC packaging
More information about the pkg-boinc-commits
mailing list