summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-06-15 10:48:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:27 -0500
commitfdced4467f6108eb848ffe79b9604134487c543c (patch)
tree99501b82451de2b8e4f94b483944d46c9ebf5e1c /source3
parent580e9817a2f1201a383b1a0763074e169ef564cc (diff)
downloadsamba-fdced4467f6108eb848ffe79b9604134487c543c.tar.gz
samba-fdced4467f6108eb848ffe79b9604134487c543c.tar.bz2
samba-fdced4467f6108eb848ffe79b9604134487c543c.zip
r16249: Fix Klokwork ID 130
(This used to be commit 09586824f6568fb3305e3e59ba6bc8f5f632fb56)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clidfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index 03cfd4dd40..298f4d1b54 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -415,7 +415,7 @@ static void clean_path( pstring clean, const char *path )
/* strip a trailing backslash */
len = strlen( newpath );
- if ( newpath[len-1] == '\\' )
+ if ( (len > 0) && (newpath[len-1] == '\\') )
newpath[len-1] = '\0';
pstrcpy( clean, newpath );