aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2013-08-31 12:39:58 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-09-09 12:58:46 +0200
commit49a9b07924f6bbb4d359254a5c4d5fb1b6868f8e (patch)
tree0d3b4d8aac60c8d39d6da89bcb436fd14b5efd8a
parent4a87a1ee35b8f7b6da9991b814518bf1b188ca9e (diff)
downloadcsync-49a9b07924f6bbb4d359254a5c4d5fb1b6868f8e.tar.gz
csync-49a9b07924f6bbb4d359254a5c4d5fb1b6868f8e.tar.xz
csync-49a9b07924f6bbb4d359254a5c4d5fb1b6868f8e.zip
owncloud: Fix crash in _cleanPath with URIs with no path
Calling _cleanPath() with an URI with no path (eg owncloud://owncloud.example.com) would result in a crash in _cleanPath(). This was fixed in 2d6514b5 but part of the fix was silently lost in 3de8a78e during refactoring. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--modules/csync_owncloud.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/csync_owncloud.c b/modules/csync_owncloud.c
index 2d3fc3f..a73f1dc 100644
--- a/modules/csync_owncloud.c
+++ b/modules/csync_owncloud.c
@@ -314,7 +314,8 @@ static char *_cleanPath( const char* uri ) {
DEBUG_WEBDAV("Unable to cleanPath %s", uri ? uri: "<zero>" );
re = NULL;
} else {
- re = ne_path_escape( path );
+ if (path)
+ re = ne_path_escape( path );
}
SAFE_FREE( path );