--- wget-1.10/src/http-ntlm.c.can-2005-3185 2005-05-10 15:16:53.000000000 -0600 +++ wget-1.10.2/src/http-ntlm.c 2005-10-13 02:52:21.000000000 -0600 @@ -526,6 +526,11 @@ size=64; ntlmbuf[62]=ntlmbuf[63]=0; + /* Make sure that the user and domain strings fit in the target buffer + before we copy them there. */ + if(size + userlen + domlen >= sizeof(ntlmbuf)) + return NULL; + memcpy(&ntlmbuf[size], domain, domlen); size += domlen;