mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
r16249: Fix Klokwork ID 130
This commit is contained in:
parent
e56e3c19e1
commit
09586824f6
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user