summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/client/client.c2
-rw-r--r--source3/utils/net_usershare.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index c1ff1151c0..94fcaaca00 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -1008,7 +1008,7 @@ static int cmd_mget(void)
while (next_token_nr(NULL,p,NULL,sizeof(buf))) {
pstrcpy(mget_mask,cur_dir);
- if ((mask[0] != '\0') && (mget_mask[strlen(mget_mask)-1]!='\\'))
+ if ((mget_mask[0] != '\0') && (mget_mask[strlen(mget_mask)-1]!='\\'))
pstrcat(mget_mask,"\\");
if (*p == '\\')
diff --git a/source3/utils/net_usershare.c b/source3/utils/net_usershare.c
index 1ee156c4ee..ca9ca4e6e2 100644
--- a/source3/utils/net_usershare.c
+++ b/source3/utils/net_usershare.c
@@ -129,7 +129,7 @@ int net_usershare_usage(int argc, const char **argv)
static void get_basepath(pstring basepath)
{
pstrcpy(basepath, lp_usershare_path());
- if (basepath[strlen(basepath)-1] == '/') {
+ if ((basepath[0] != '\0') && (basepath[strlen(basepath)-1] == '/')) {
basepath[strlen(basepath)-1] = '\0';
}
}