summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils/net_rpc.c')
-rw-r--r--source3/utils/net_rpc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index fdb11f33a0..5b3b1e34d7 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -4262,8 +4262,9 @@ static bool get_user_tokens_from_file(FILE *f,
return true;
}
- if (line[strlen(line)-1] == '\n')
+ if ((strlen(line) > 0) && (line[strlen(line)-1] == '\n')) {
line[strlen(line)-1] = '\0';
+ }
if (line[0] == ' ') {
/* We have a SID */