Your message dated Sat, 3 Sep 2011 20:01:31 +0200
with message-id <[email protected]>
and subject line Re: Bug#636949: gnutls26: FTBFS on hurd-i386
has caused the Debian Bug report #636949,
regarding gnutls26: FTBFS on hurd-i386
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
636949: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636949
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gnutls26
Version: 2.12.7-4
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd

Hi,

currently[1], gnutls26 does not compile on hurd-i386.

The problem is the use of PATH_MAX, which is not defined on Hurd.
The attached patch fixes the issue, making use of dynamic memory
allocation to build the path string. All the test suites pass.

[1] 
https://buildd.debian.org/status/fetch.php?pkg=gnutls26&arch=hurd-i386&ver=2.12.7-4&stamp=1312709718

Thanks,
-- 
Pino
--- a/lib/pakchois/pakchois.c
+++ b/lib/pakchois/pakchois.c
@@ -186,11 +186,13 @@
   char module_path[] = PAKCHOIS_MODPATH;
   char *next = module_path;
   struct stat st;
+  size_t hint_len = strlen (hint);
 
   while (next)
     {
       char *dir = next, *sep = strchr (next, ':');
       unsigned i;
+      size_t dir_len = strlen (dir);
 
       if (sep)
         {
@@ -204,18 +206,24 @@
 
       for (i = 0; suffix_prefixes[i][0]; i++)
         {
-          char path[PATH_MAX];
+          size_t path_len = dir_len + 1 + strlen (suffix_prefixes[i][0]) + hint_len + strlen (suffix_prefixes[i][1]) + 1;
+          char *path = malloc (path_len);
+          if (path == NULL)
+            continue;
 
-          snprintf (path, sizeof path, "%s/%s%s%s", dir,
+          snprintf (path, path_len, "%s/%s%s%s", dir,
                     suffix_prefixes[i][0], hint, suffix_prefixes[i][1]);
 
           if (stat (path, &st) < 0)
-            continue;
+            {
+              free (path);
+              continue;
+            }
 
           *dev = st.st_dev;
           *ino = st.st_ino;
 
-          return strdup (path);
+          return path;
         }
     }
 

--- End Message ---
--- Begin Message ---
Version: 2.12.10-1

On 2011-09-03 Andreas Metzler <[email protected]> wrote:
[...]
> I have just uploaded 2.12.10. I guess you'll need to build this
> manually (with libgcryp11 1.4.6), as libgnutls' build-depends include
> libgnutls26 (via gtk-doc-tools -> ... --> git) which I have made
> uninstallable on gnu-hurd.

[...]

It was built successfully. Closing.

cu andreas


--- End Message ---

Reply via email to