summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2004-03-30 08:11:59 +0000
committerVolker Lendecke <vlendec@samba.org>2004-03-30 08:11:59 +0000
commit62ae6e36f09c2ec402bc7816651bfaa1af2e6bb6 (patch)
tree96f442ac9d13417f53906333ac7ccc0c73377df9 /source3
parent97b200d422ce7e4acc9a6a9e786c4d44b3c6dfc3 (diff)
downloadsamba-62ae6e36f09c2ec402bc7816651bfaa1af2e6bb6.tar.gz
samba-62ae6e36f09c2ec402bc7816651bfaa1af2e6bb6.tar.bz2
samba-62ae6e36f09c2ec402bc7816651bfaa1af2e6bb6.zip
Merge a fix from HEAD to 3_0
Volker (This used to be commit 6bc88d91e569541e4d4a2147e28439db96d02bd6)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/winbindd_wins.c5
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");