From 6bc88d91e569541e4d4a2147e28439db96d02bd6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 30 Mar 2004 08:11:59 +0000 Subject: [PATCH] Merge a fix from HEAD to 3_0 Volker --- source/nsswitch/winbindd_wins.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/nsswitch/winbindd_wins.c b/source/nsswitch/winbindd_wins.c index bc982d00443..a1eef159c0a 100644 --- a/source/nsswitch/winbindd_wins.c +++ b/source/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"); -- 2.34.1