aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--src/gpg-error.c4
-rw-r--r--src/init.c4
3 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 829ec28..e44bd0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-07-04 Marcus Brinkmann <[email protected]>
+
+ * src/init.c (get_locale_dir): Return NULL instead of garbage.
+ * src/gpg-error.c (get_locale_dir): Likewise.
+ Reported by Simon Josefsson <[email protected]>.
+
2006-05-30 Marcus Brinkmann <[email protected]>
* lang/cl/gpg-error.asd.in (gpg-error): Add "depends-on" on cffi.
diff --git a/src/gpg-error.c b/src/gpg-error.c
index 806bd54..e5b7fc4 100644
--- a/src/gpg-error.c
+++ b/src/gpg-error.c
@@ -215,7 +215,7 @@ get_locale_dir (void)
instdir = read_w32_registry_string ("HKEY_LOCAL_MACHINE", REGKEY,
"Install Directory");
if (!instdir)
- return;
+ return NULL;
/* Build the key: "<instdir>/share/locale". */
#define SLDIR "\\share\\locale"
@@ -223,7 +223,7 @@ get_locale_dir (void)
if (!dname)
{
free (instdir);
- return;
+ return NULL;
}
p = dname;
strcpy (p, instdir);
diff --git a/src/init.c b/src/init.c
index 4e106ca..60c60b7 100644
--- a/src/init.c
+++ b/src/init.c
@@ -196,7 +196,7 @@ get_locale_dir (void)
instdir = read_w32_registry_string ("HKEY_LOCAL_MACHINE", REGKEY,
"Install Directory");
if (!instdir)
- return;
+ return NULL;
/* Build the key: "<instdir>/share/locale". */
#define SLDIR "\\share\\locale"
@@ -204,7 +204,7 @@ get_locale_dir (void)
if (!dname)
{
free (instdir);
- return;
+ return NULL;
}
p = dname;
strcpy (p, instdir);