summaryrefslogtreecommitdiff
path: root/source3/libsmb/clidfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/clidfs.c')
-rw-r--r--source3/libsmb/clidfs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index 298f4d1b54..e564bc4295 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -652,9 +652,12 @@ BOOL cli_resolve_path( const char *mountpt, struct cli_state *rootcli, const cha
fullpath[consumed/2] = '\0';
dos_clean_name( fullpath );
- ppath = strchr_m( fullpath, '\\' );
- ppath = strchr_m( ppath+1, '\\' );
- ppath = strchr_m( ppath+1, '\\' );
+ if ((ppath = strchr_m( fullpath, '\\' )) == NULL)
+ return False;
+ if ((ppath = strchr_m( ppath+1, '\\' )) == NULL)
+ return False;
+ if ((ppath = strchr_m( ppath+1, '\\' )) == NULL)
+ return False;
ppath++;
pstr_sprintf( newmount, "%s\\%s", mountpt, ppath );