summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-06-16 11:14:29 +0200
committerKarolin Seeger <kseeger@samba.org>2009-07-30 09:22:14 +0200
commit4cad817a8ed70df3db75a9d728414dfd7104ae1a (patch)
tree41522c2149f96e321d841c2293fe7811f119e2eb
parent7f260289490635806cd8765e66e2b61ba6c098f2 (diff)
downloadsamba-4cad817a8ed70df3db75a9d728414dfd7104ae1a.tar.gz
Workaround for KB932762
(cherry picked from commit a15c816ba5fd4dcedd68beb1fcb0540de325c1cb)
-rw-r--r--source/smbd/lanman.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/smbd/lanman.c b/source/smbd/lanman.c
index abdd4e9a72d..a4c34b66d5c 100644
--- a/source/smbd/lanman.c
+++ b/source/smbd/lanman.c
@@ -1137,7 +1137,9 @@ static int get_server_info(uint32 servertype,
if (!next_token(&ptr,stype, NULL, sizeof(stype))) {
continue;
}
- if (!next_token(&ptr,s->comment, NULL, sizeof(s->comment))) {
+ if (!next_token(&ptr,s->comment, NULL,
+ MIN(sizeof(s->comment),
+ MAX_SERVER_STRING_LENGTH))) {
continue;
}
if (!next_token(&ptr,s->domain, NULL, sizeof(s->domain))) {