projects
/
oweals
/
cde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e5560c
)
dtgreet: Do not crash if LANG is not set in the environment.
author
Pascal Stumpf
<Pascal.Stumpf@cubes.de>
Tue, 20 Nov 2012 18:42:33 +0000
(19:42 +0100)
committer
Jon Trulson
<jon@radscan.com>
Wed, 21 Nov 2012 00:17:29 +0000
(17:17 -0700)
In that case, catopen() will have never been called, and we'd feed 0 as the
first argument to catgets(). This crashes, at least on OpenBSD.
cde/programs/dtlogin/vgutil.c
patch
|
blob
|
history
diff --git
a/cde/programs/dtlogin/vgutil.c
b/cde/programs/dtlogin/vgutil.c
index 1d7e73ed6cc37100ba8c6cd0839a0a09dc6bb3a3..f38c7778ca522111b6a517bd21fd78dd697b0f9d 100644
(file)
--- a/
cde/programs/dtlogin/vgutil.c
+++ b/
cde/programs/dtlogin/vgutil.c
@@
-791,7
+791,7
@@
unsigned char *
ReadCatalog(int setn, int msgn, char *dflt)
{
OpenCatalog();
- if (
0 > (int) nl_fd
)
+ if (
(0 > (int) nl_fd) || (NULL == langenv)
)
return (unsigned char*) dflt;
else
return (unsigned char*) catgets(nl_fd, setn, msgn, dflt);