Bugfix: An empty enironment variable $USER caused a crash.
Warning, cannot access the index:
_darcs/index: opening of '_darcs/index' failed: permission denied (Permission denied)
diff -rN -u old-DM2K/dm2kApp/dm2k/dm2k.c new-DM2K/dm2kApp/dm2k/dm2k.c
--- old-DM2K/dm2kApp/dm2k/dm2k.c 2022-06-25 21:48:37.647084372 +0200
+++ new-DM2K/dm2kApp/dm2k/dm2k.c 2022-06-25 21:48:37.651084441 +0200
@@ -3853,11 +3853,11 @@
for (nv = 0; nv < defaultNameValueTableSize; nv++ ) {
char *p = getenv(defaultNameValueTable[nv].name);
+ if (!p) p="";
+
if (!strcmp( defaultNameValueTable[nv].name, "DISPLAY" )) {
int i = 0, skip = 0, colon = 0;
- if (!p) p="";
-
int useNodename= ! ( p[0] != ':') ;
if ( !p ) p = ":0.0";
patch 180f7c3e28ba3e6885d8b5f0c621f0e441e5eb8f
Author: Goetz.Pfeiffer@helmholtz-berlin.de
Date: Thu Feb 27 08:39:39 CET 2020
* Bugfix: An empty enironment variable $USER caused a crash.
getenv() returns a NULL pointer if a variable is not set. This was not handled
correctly in main()