From: Volker Lendecke Date: Tue, 16 Jun 2009 09:14:29 +0000 (+0200) Subject: Workaround for KB932762 X-Git-Tag: samba-3.0.36~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cad817a8ed70df3db75a9d728414dfd7104ae1a;p=thirdparty%2Fsamba.git Workaround for KB932762 (cherry picked from commit a15c816ba5fd4dcedd68beb1fcb0540de325c1cb) --- 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))) {