mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-29 21:33:30 +02:00
Allocate only up to 128KB for a pathname. While this is an arbitrary value
2000-03-21 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_current_dir): Allocate only up to 128KB for a pathname. While this is an arbitrary value just like 2048, it seems to be enough (after all, even 4GB is an arbitrary value).
This commit is contained in:
committed by
Sebastian Wilhelmi
parent
68c4ed996f
commit
cdb6195572
@@ -346,7 +346,7 @@ g_get_current_dir (void)
|
||||
*buffer = 0;
|
||||
dir = getwd (buffer);
|
||||
#else /* !sun */
|
||||
while (1)
|
||||
while (max_len < 128 * 1024)
|
||||
{
|
||||
buffer = g_new (gchar, max_len + 1);
|
||||
*buffer = 0;
|
||||
|
Reference in New Issue
Block a user