summaryrefslogtreecommitdiffstats
path: root/source/nsswitch
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
commit6bc88d91e569541e4d4a2147e28439db96d02bd6 (patch)
treea308c95eb74c1c68b0cffa15ca44cd2475a71e1a /source/nsswitch
parent8037750df568e6b51b2b0cba9192468110470388 (diff)
downloadsamba-6bc88d91e569541e4d4a2147e28439db96d02bd6.tar.gz
samba-6bc88d91e569541e4d4a2147e28439db96d02bd6.tar.xz
samba-6bc88d91e569541e4d4a2147e28439db96d02bd6.zip
Merge a fix from HEAD to 3_0
Volker
Diffstat (limited to 'source/nsswitch')
-rw-r--r--source/nsswitch/winbindd_wins.c5
1 files changed, 4 insertions, 1 deletions
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");