[SCM] Git repository for pkg-virtuoso branch, master, updated. debian/6.1.4+dfsg1-3-21-g01a3c9c

Maximiliano Curia maxy at gnuservers.com.ar
Tue Jun 11 09:13:43 UTC 2013


The following commit has been merged in the master branch:
commit 01a3c9c4b5f203d71b7c8e305ff1a6b0c7e61e22
Author: Maximiliano Curia <maxy at gnuservers.com.ar>
Date:   Mon Jun 10 15:51:07 2013 +0200

    New patch: do_not_depend_on_MAXPATHLEN.patch.

diff --git a/debian/changelog b/debian/changelog
index 06067d4..334b6da 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+virtuoso-opensource (6.1.6+dfsg-2) UNRELEASED; urgency=low
+
+  * New patch: do_not_depend_on_MAXPATHLEN.patch.
+
+ -- Maximiliano Curia <maxy at debian.org>  Mon, 10 Jun 2013 15:50:21 +0200
+
 virtuoso-opensource (6.1.6+dfsg-1) experimental; urgency=low
 
   [ José Manuel Santamaría Lema ]
diff --git a/debian/patches/do_not_depend_on_MAXPATHLEN.patch b/debian/patches/do_not_depend_on_MAXPATHLEN.patch
new file mode 100644
index 0000000..3faa6f1
--- /dev/null
+++ b/debian/patches/do_not_depend_on_MAXPATHLEN.patch
@@ -0,0 +1,89 @@
+commit 5323b0344114fe5210f1d03d6753646499f7cd8e
+Author: Maximiliano Curia <maxy at gnuservers.com.ar>
+Date:   Mon Jun 10 15:23:25 2013 +0200
+
+    Do not depend on MAXPATHLEN
+
+diff --git a/binsrc/hosting/fcgi/cgi_fcgi.c b/binsrc/hosting/fcgi/cgi_fcgi.c
+index 0695097..ae1daca 100644
+--- a/binsrc/hosting/fcgi/cgi_fcgi.c
++++ b/binsrc/hosting/fcgi/cgi_fcgi.c
+@@ -55,7 +55,7 @@ typedef struct vfc_fcgi_srv_s
+   dk_mutex_t *mtx;
+   caddr_t uri;
+   int n_servers;
+-  char bind_path [MAXPATHLEN];
++  char *bind_path;
+ 
+   int next_req_id;
+   dk_set_t requests;
+@@ -111,6 +111,7 @@ vfc_fcgi_server_allocate (const char *base_uri, const char *bind_file, char *err
+ {
+   vfc_fcgi_srv_t *srv = (vfc_fcgi_srv_t *) dk_alloc (sizeof (vfc_fcgi_srv_t));
+   caddr_t md5_val = NULL;
++  char *aux;
+ 
+   vfc_printf (("vfc_fcgi_server_allocate base_uri=[%s] bind_file=[%s]\n",
+ 	base_uri,bind_file));
+@@ -122,8 +123,9 @@ vfc_fcgi_server_allocate (const char *base_uri, const char *bind_file, char *err
+   if (!bind_file)
+     md5_val = md5 (srv->uri);
+   vfc_printf (("vfc_fcgi_server_allocate md5_val=[%s] \n", md5_val));
+-  snprintf (srv->bind_path, sizeof (srv->bind_path), "%s/%s",
+-      fcgi_socket_path, bind_file ? bind_file : md5_val);
++  aux = bind_file ? bind_file : md5_val;
++  srv->bind_path = malloc(strlen(fcgi_socket_path) + strlen(aux) + 2);
++  sprintf (srv->bind_path, "%s/%s", fcgi_socket_path, aux);
+   id_hash_set (vfc_server_hash, (caddr_t) &srv->uri, (caddr_t) &srv);
+   dk_free_box (md5_val);
+   vfc_printf (("vfc_fcgi_server_allocate ret =%p\n",
+diff --git a/libsrc/util/fnsearch.c b/libsrc/util/fnsearch.c
+index 62f566e..fc76608 100644
+--- a/libsrc/util/fnsearch.c
++++ b/libsrc/util/fnsearch.c
+@@ -40,14 +40,21 @@
+ char *
+ fnsearch (const char *filename, const char *path)
+ {
+-  static char namebuf[MAXPATHLEN];
++  static char *namebuf = NULL;
+   const char *cp;
+   char *np;
+ 
+   if (path == NULL)
+     return NULL;
+-  np = namebuf;
+   cp = path;
++
++  /* Ask for enough space to store the result */
++  /* note that realloc of NULL behaves like malloc */
++  np = realloc(namebuf, strlen(path) + strlen(filename) + 2);
++  if (np == NULL)
++    return NULL;
++  namebuf = np;
++
+   while (1)
+     {
+       if (*cp == PATHSEP || *cp == '\0')
+diff --git a/libsrc/util/setext.c b/libsrc/util/setext.c
+index d7c0295..7afb834 100644
+--- a/libsrc/util/setext.c
++++ b/libsrc/util/setext.c
+@@ -46,10 +46,16 @@
+ char *
+ setext (const char *path, const char *ext, int mode)
+ {
+-  static char name[MAXPATHLEN];
++  static char *name = NULL;
+   char *slash;
+   char *dot;
+ 
++  /* A bit more space than really needed */
++  dot = realloc(name, strlen(path) + strlen(ext) + 2);
++  if (dot == NULL)
++    return NULL;
++  name = dot;
++
+   strcpy (name, path);
+ 
+ #ifdef VMS
diff --git a/debian/patches/series b/debian/patches/series
index f24282b..45c5a5d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@ build-gmake-to-make.patch
 ignore-netstat-failure.patch
 disable-full-test-suite.patch
 check_log_fix.patch
+do_not_depend_on_MAXPATHLEN.patch

-- 
Git repository for pkg-virtuoso



More information about the Pkg-virtuoso-commits mailing list