long substitution patch



Hi all,

We were not having much luck getting redhat 8.0 working with our afs
setup. Traced the problem to gconfd-2 dieing when faced with a longish
$HOME variable.

Here's a patch that fixes problems when a substitution is over twice the
length of the original string. 

Cheers,

--
Benn Vosseteig

--- gconf-internals.c~  2002-07-24 05:14:07.000000000 +1200
+++ gconf-internals.c   2002-10-18 10:44:15.000000000 +1300
@@ -798,7 +798,7 @@
 
               if ((retval_len - pos) < varval_len)
                 {
-                  retval_len *= 2;
+                  retval_len = pos + varval_len;
                   retval = g_realloc(retval, retval_len+3);
                 }




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