[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Crash on empty HOME var in Windows registry
From: |
Juanma Barranquero |
Subject: |
Re: Crash on empty HOME var in Windows registry |
Date: |
Mon, 18 Jun 2007 14:15:31 +0200 |
On 6/18/07, Vincent Liard <vincent.liard@free.fr> wrote:
having an empty HOME string value at this place causes emacs to
crash at start.
In fact Emacs is not crashing, but aborting because it doesn't have a
valid HOME value in its environment. It's a check.
It could be fixed with the simple patch below, which forces
environment variables coming from the registry to have non-null values
(else they get the default value).
I'm not sure whether is the right thing to do, though: first, because
a null HOME or SHELL in the registry is likely an error; and second,
because I'm not sure it makes sense for other environment variables to
have null values on the registry.
Jason?
Juanma
Index: src/w32.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/w32.c,v
retrieving revision 1.113
diff -u -2 -r1.113 w32.c
--- src/w32.c 14 Jun 2007 15:58:13 -0000 1.113
+++ src/w32.c 18 Jun 2007 12:07:47 -0000
@@ -1156,5 +1156,6 @@
int dont_free = 0;
- if ((lpval = w32_get_resource (env_vars[i].name, &dwType)) == NULL)
+ if ((lpval = w32_get_resource (env_vars[i].name, &dwType)) == NULL
+ || *lpval == 0)
{
lpval = env_vars[i].def_value;
- Crash on empty HOME var in Windows registry, Vincent Liard, 2007/06/18
- Re: Crash on empty HOME var in Windows registry,
Juanma Barranquero <=
- Re: Crash on empty HOME var in Windows registry, Vincent Liard, 2007/06/18
- Re: Crash on empty HOME var in Windows registry, Jason Rumney, 2007/06/18
- Re: Crash on empty HOME var in Windows registry, Juanma Barranquero, 2007/06/18
- Re: Crash on empty HOME var in Windows registry, Jason Rumney, 2007/06/18
- Re: Crash on empty HOME var in Windows registry, Lennart Borgman (gmail), 2007/06/18
- Re: Crash on empty HOME var in Windows registry, Juanma Barranquero, 2007/06/18
- Re: Crash on empty HOME var in Windows registry, Lennart Borgman (gmail), 2007/06/18
- Re: Crash on empty HOME var in Windows registry, Jason Rumney, 2007/06/18
- Re: Crash on empty HOME var in Windows registry, Lennart Borgman (gmail), 2007/06/18