diff options
author | Robert Milasan <rmilasan@suse.com> | 2015-01-20 13:33:37 +0100 |
---|---|---|
committer | Robert Milasan <rmilasan@suse.com> | 2015-01-20 13:33:37 +0100 |
commit | f59c925f8b0a1ee55bf7d7da75f0e20a899c980d (patch) | |
tree | c7e797bea9f0ede9e51d73f7eaa2e158dc7ab533 /sesman/chansrv/chansrv.c | |
parent | 9c5c0660b2e84d26699f95cf8ae69d4ac9184f8a (diff) | |
download | xrdp-proprietary-f59c925f8b0a1ee55bf7d7da75f0e20a899c980d.tar.gz xrdp-proprietary-f59c925f8b0a1ee55bf7d7da75f0e20a899c980d.zip |
fix possible segfault in chansrv if DISPLAY is not set
Diffstat (limited to 'sesman/chansrv/chansrv.c')
-rw-r--r-- | sesman/chansrv/chansrv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c index af2f6957..29e8c106 100644 --- a/sesman/chansrv/chansrv.c +++ b/sesman/chansrv/chansrv.c @@ -1534,7 +1534,9 @@ main(int argc, char **argv) display_text = g_getenv("DISPLAY"); LOGM((LOG_LEVEL_INFO, "main: DISPLAY env var set to %s", display_text)); - get_display_num_from_display(display_text); + + if (display_text) + get_display_num_from_display(display_text); if (g_display_num == 0) { |