[SCM] BOINC packaging branch, master, updated. debian/6.10.17+dfsg-3-414-geec4d18

Steffen Moeller moeller at debian.org
Wed Mar 14 22:37:41 UTC 2012


The following commit has been merged in the master branch:
commit 4560aa4fbae0f61c4328be72a265361bbe088d61
Author: Steffen Moeller <moeller at debian.org>
Date:   Sat Mar 3 12:16:31 2012 +0100

    Added some patches substituting strcpy

diff --git a/debian/patches/sched_vda_strncpy.patch b/debian/patches/sched_vda_strncpy.patch
new file mode 100644
index 0000000..1783a80
--- /dev/null
+++ b/debian/patches/sched_vda_strncpy.patch
@@ -0,0 +1,38 @@
+Index: boinc/vda/sched_vda.cpp
+===================================================================
+--- boinc.orig/vda/sched_vda.cpp	2012-03-03 01:12:31.000000000 +0100
++++ boinc/vda/sched_vda.cpp	2012-03-03 12:13:55.000000000 +0100
+@@ -48,11 +48,13 @@
+ 
+ typedef map<string, DB_VDA_CHUNK_HOST> CHUNK_LIST;
+ 
++static const size_t chunk_dirs_size=256;
++
+ // get the path to the chunk's directory
+ //
+ static void get_chunk_dir(DB_VDA_FILE& vf, const char* chunk_name, char* dir) {
+-    char chunk_dirs[256];
+-    strcpy(chunk_dirs, chunk_name);
++    char chunk_dirs[chunk_dirs_size];
++    strlcpy(chunk_dirs, chunk_name, chunk_dirs_size);
+     while (1) {
+         char* p = strchr(chunk_dirs, '.');
+         if (!p) break;
+@@ -63,7 +65,7 @@
+ 
+ static void get_chunk_url(DB_VDA_FILE& vf, const char* chunk_name, char* url) {
+     char chunk_dirs[256];
+-    strcpy(chunk_dirs, chunk_name);
++    strlcpy(chunk_dirs, chunk_name, chunk_dirs_size);
+     while (1) {
+         char* p = strchr(chunk_dirs, '.');
+         if (!p) break;
+@@ -74,7 +76,7 @@
+ 
+ // read the chunk's MD5 file into a buffer
+ //
+-static int get_chunk_md5(char* chunk_dir, char* md5_buf) {
++static int get_chunk_md5(const char* chunk_dir, char* md5_buf) {
+     char md5_path[1024];
+     sprintf(md5_path, "%s/md5.txt", chunk_dir);
+     FILE* f = fopen(md5_path, "r");
diff --git a/debian/patches/series b/debian/patches/series
index cbc7d53..195098b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -21,3 +21,4 @@ stripchart_security.patch
 redundant_i.patch
 cppcheck_realloc.patch
 cwd_handling.patch
+sched_vda_strncpy.patch

-- 
BOINC packaging



More information about the pkg-boinc-commits mailing list