From 4be5257f2c1b243a34b9d8a8365ca1459d61412b Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 28 Oct 2002 17:32:55 +0000 Subject: * w32reg.c (read_w32_registry_string): Fixed expanding of the environment buffer; didn't worked at all. Reported by Thijmen Klok. --- util/ChangeLog | 6 ++++++ util/w32reg.c | 1 + 2 files changed, 7 insertions(+) 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 + + * 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 * 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; -- cgit v1.2.3