mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
Check for directory separator `\' in program name, by JR Heisey
This commit is contained in:
parent
3cfa89c3d1
commit
ce9d86a278
@ -95,7 +95,8 @@ main( int argc, char **argv )
|
||||
FILE *fp;
|
||||
int rc, i, use_ldif, authmethod, version, want_bindpw, debug;
|
||||
|
||||
if (( prog = strrchr( argv[ 0 ], '/' )) == NULL ) {
|
||||
if (( prog = strrchr( argv[ 0 ], '/' )) == NULL &&
|
||||
( prog = strrchr( argv[ 0 ], '\\' )) == NULL ) { // for Windows/DOS
|
||||
prog = argv[ 0 ];
|
||||
} else {
|
||||
++prog;
|
||||
|
Loading…
Reference in New Issue
Block a user