~paulliu/ubuntu/quantal/freerdp/fixext

« back to all changes in this revision

Viewing changes to debian/patches/cherry-pick-8293c5b4cb072038fe2bdc15207ee6de4e291879

  • Committer: Package Import Robot
  • Author(s): Stéphane Graber
  • Date: 2012-06-13 19:08:57 UTC
  • Revision ID: package-import@ubuntu.com-20120613190857-uo2p94sonsmali6t
Tags: 1.0.1-1ubuntu4
Cherry pick upstream bugfix for crash when $HOME is unset.
(LP: #1011790)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Cherry pick commit 8293c5b4cb072038fe2bdc15207ee6de4e291879
 
2
 Cherry pick fix for crash when $HOME is unset.
 
3
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1011790
 
4
 
 
5
Origin: upstream https://github.com/FreeRDP/FreeRDP/commit/8293c5b4cb072038fe2bdc15207ee6de4e291879
 
6
 
 
7
--- freerdp-1.0.1.orig/libfreerdp-utils/file.c
 
8
+++ freerdp-1.0.1/libfreerdp-utils/file.c
 
9
@@ -82,6 +82,8 @@ char* freerdp_get_home_path(rdpSettings*
 
10
 {
 
11
        if (settings->home_path == NULL)
 
12
                settings->home_path = getenv(HOME_ENV_VARIABLE);
 
13
+       if (settings->home_path == NULL)
 
14
+               settings->home_path = xstrdup("/");
 
15
 
 
16
        return settings->home_path;
 
17
 }
 
18
--- freerdp-1.0.1.orig/libfreerdp-utils/registry.c
 
19
+++ freerdp-1.0.1/libfreerdp-utils/registry.c
 
20
@@ -131,13 +131,6 @@ void registry_init(rdpRegistry* registry
 
21
        else
 
22
                home_path = registry->settings->home_path;
 
23
 
 
24
-       if (home_path == NULL)
 
25
-       {
 
26
-               printf("could not get home path\n");
 
27
-               registry->available = false;
 
28
-               return;
 
29
-       }
 
30
-
 
31
        registry->available = true;
 
32
 
 
33
        if (home_path == NULL)