1 Description: Do not assume that the environment contains a DISPLAY variable
2 Previously, the code unconditionally tried to copy it to a variable.
3 This segfaults when that variable does not exist.
4 Author: Marius Gavrilescu <marius@ieval.ro>
5 Bug-Debian: http://bugs.debian.org/716500
6 Forwarded: https://github.com/jim-rees/xfishtank/issues/5
7 Bug: https://github.com/jim-rees/xfishtank/issues/5
8 Last-Update: 2013-07-11
10 --- xfishtank-2.3.orig/xfish.c
11 +++ xfishtank-2.3/xfish.c
12 @@ -171,12 +171,14 @@ int argc;
16 + const char *display = getenv("DISPLAY");
22 - strncpy(sname, getenv("DISPLAY"), sizeof(sname) - 1);
24 + strncpy(sname, display, sizeof(sname) - 1);
25 strcpy(cname, "MediumAquamarine");
27 while ((c = getopt(argc, argv, "dDob:C:c:p:m:f:i:r:s")) != EOF) {