--- lib/http_ntlm.c.can-2005-0490 2004-01-08 14:56:51.000000000 -0700 +++ lib/http_ntlm.c 2005-02-28 11:02:44.170533437 -0700 @@ -105,13 +105,15 @@ header++; if(checkprefix("NTLM", header)) { - unsigned char buffer[256]; header += strlen("NTLM"); while(*header && isspace((int)*header)) header++; if(*header) { + unsigned char *buffer = (unsigned char *)malloc(strlen(header)); + if (buffer == NULL) + return CURLNTLM_BAD; /* We got a type-2 message here: Index Description Content @@ -136,6 +138,8 @@ /* at index decimal 20, there's a 32bit NTLM flag field */ + free(buffer); + } else { if(ntlm->state >= NTLMSTATE_TYPE1)