Source: stealth
Version: 4.01.05-1
Severity: important
Tags: patch, upstream
User: [email protected]
Usertags: hurd

Hi,

stealth currently FTBFS on GNU/Hurd due to a PATH_MAX issue. The attached patch
fixes this issue by using getcwd(3) with arguments NULL,0 supported by all
recent versions of glibc.

Thanks!
Index: stealth-4.01.05/options/getcwd.cc
===================================================================
--- stealth-4.01.05.orig/options/getcwd.cc
+++ stealth-4.01.05/options/getcwd.cc
@@ -2,9 +2,13 @@
 
 string Options::getCwd()
 {
-    char buffer[PATH_MAX];
-    string base(getcwd(buffer, PATH_MAX));
+    char *buffer = getcwd(NULL, 0);
+    if (buffer == NULL)
+	return "";
+
+    string base(buffer);
     base += '/';
-    
+    free(buffer);
+
     return base;
 }

Reply via email to