summaryrefslogtreecommitdiff
path: root/glib
diff options
context:
space:
mode:
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>2000-03-22 15:18:11 +0000
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>2000-03-22 15:18:11 +0000
commit837cbbdf8d71532c6584c61f9a64252bac1685ee (patch)
treec3fc7f52f4b7af6b102362867e440ea52491bfcc /glib
parent762a2befa463ba4b6c2e8733abe5bfdaf7080043 (diff)
downloadglib-837cbbdf8d71532c6584c61f9a64252bac1685ee.tar.gz
Ok, Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> convinced me,
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> convinced me, that 128 KB path length might not be enough for the HURD. So I changed the loop to at least avoid an integer overflow, which could happen at beyond 2GB size ;-)
Diffstat (limited to 'glib')
-rw-r--r--glib/gutils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/glib/gutils.c b/glib/gutils.c
index a44c4fa8b..aad31927f 100644
--- a/glib/gutils.c
+++ b/glib/gutils.c
@@ -344,7 +344,7 @@ g_get_current_dir (void)
*buffer = 0;
dir = getwd (buffer);
#else /* !sun */
- while (max_len < 128 * 1024)
+ while (max_len < G_MAXULONG / 2)
{
buffer = g_new (gchar, max_len + 1);
*buffer = 0;