aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/ChangeLog6
-rw-r--r--util/w32reg.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/util/ChangeLog b/util/ChangeLog
index 368a9a5cd..adb380b60 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,3 +1,9 @@
+2002-10-28 Werner Koch <[email protected]>
+
+ * w32reg.c (read_w32_registry_string): Fixed expanding of the
+ environment buffer; didn't worked at all. Reported by Thijmen
+ Klok.
+
2002-10-28 Stefan Bellon <[email protected]>
* fileutil.c (make_basename) [__riscos__]: Cut off RISC OS' filing
diff --git a/util/w32reg.c b/util/w32reg.c
index 5391c8027..aa507b2d7 100644
--- a/util/w32reg.c
+++ b/util/w32reg.c
@@ -103,6 +103,7 @@ read_w32_registry_string( const char *root, const char *dir, const char *name )
nbytes = ExpandEnvironmentStrings (result, tmp, n1);
if (nbytes && nbytes > n1) {
free (tmp);
+ n1 = nbytes;
tmp = malloc (n1 + 1);
if (!tmp)
goto leave;