diff options
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/winbindd_wins.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/nsswitch/winbindd_wins.c b/source3/nsswitch/winbindd_wins.c index bc982d0044..a1eef159c0 100644 --- a/source3/nsswitch/winbindd_wins.c +++ b/source3/nsswitch/winbindd_wins.c @@ -201,7 +201,10 @@ enum winbindd_result winbindd_wins_byname(struct winbindd_cli_state *state) } if (i != 0) { /* Clear out the newline character */ - response[strlen(response)-1] = ' '; + /* But only if there is something in there, + otherwise we clobber something in the stack */ + if (strlen(response)) + response[strlen(response)-1] = ' '; } fstrcat(response,addr); fstrcat(response,"\t"); |