From 7d3871e0cf7b7c3ead898876cdcb39b810f8f1c1 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 16 Jun 2009 11:14:29 +0200 Subject: [PATCH] Workaround for KB932762 --- source/smbd/lanman.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/source/smbd/lanman.c b/source/smbd/lanman.c index abdd4e9..a4c34b6 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))) { -- 1.5.5