From 4cad817a8ed70df3db75a9d728414dfd7104ae1a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 16 Jun 2009 11:14:29 +0200 Subject: [PATCH] Workaround for KB932762 (cherry picked from commit a15c816ba5fd4dcedd68beb1fcb0540de325c1cb) --- source/smbd/lanman.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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))) { -- 2.47.2