[gegl] gcut: use dynamic allocation instead of PATH_MAX fixing build on hurd



commit ae2f12d4d26fd1cf2cc394b22ba522fbb075418a
Author: Øyvind Kolås <pippin gimp org>
Date:   Sat Sep 2 14:35:16 2017 +0200

    gcut: use dynamic allocation instead of PATH_MAX fixing build on hurd

 gcut/gcut.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gcut/gcut.c b/gcut/gcut.c
index 8352b00..093648c 100644
--- a/gcut/gcut.c
+++ b/gcut/gcut.c
@@ -1006,8 +1006,8 @@ GeglEDL *gcut_new_from_path (const char *path)
     }
     else
     {
-      parent = g_malloc0 (PATH_MAX);
-      getcwd (parent, PATH_MAX);
+      parent = g_malloc0 (strlen(path));
+      getcwd (parent, strlen(path));
     }
     edl = gcut_new_from_string ("", parent);
     if (!edl->path)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]