Workaround for KB932762
authorVolker Lendecke <vl@samba.org>
Tue, 16 Jun 2009 09:14:29 +0000 (11:14 +0200)
committerKarolin Seeger <kseeger@samba.org>
Sat, 27 Jun 2009 08:32:56 +0000 (10:32 +0200)
source/smbd/lanman.c

index abdd4e9a72dda275458f984b131e9c1115da69b5..a4c34b66d5c96f2c8d4c559f1f62174fe42a4b8b 100644 (file)
@@ -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))) {