cURL
Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on SourceForge.net

Sponsors:
Haxx

Diff of /lib/http_ntlm.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.36, Tue Dec 7 23:09:41 2004 UTC revision 1.37, Tue Feb 22 07:44:14 2005 UTC
# Line 103  CURLntlm Curl_input_ntlm(struct connectd Line 103  CURLntlm Curl_input_ntlm(struct connectd
103      header++;      header++;
104    
105    if(checkprefix("NTLM", header)) {    if(checkprefix("NTLM", header)) {
     unsigned char buffer[256];  
106      header += strlen("NTLM");      header += strlen("NTLM");
107    
108      while(*header && isspace((int)*header))      while(*header && isspace((int)*header))
# Line 123  CURLntlm Curl_input_ntlm(struct connectd Line 122  CURLntlm Curl_input_ntlm(struct connectd
122           (40)    Target Information  (optional) security buffer(*)           (40)    Target Information  (optional) security buffer(*)
123           32 (48) start of data block           32 (48) start of data block
124        */        */
125          size_t size;
126          unsigned char *buffer = (unsigned char *)malloc(strlen(header));
127          if (buffer == NULL)
128            return CURLNTLM_BAD;
129    
130        size_t size = Curl_base64_decode(header, (char *)buffer);        size = Curl_base64_decode(header, (char *)buffer);
131    
132        ntlm->state = NTLMSTATE_TYPE2; /* we got a type-2 */        ntlm->state = NTLMSTATE_TYPE2; /* we got a type-2 */
133    
# Line 134  CURLntlm Curl_input_ntlm(struct connectd Line 137  CURLntlm Curl_input_ntlm(struct connectd
137    
138        /* at index decimal 20, there's a 32bit NTLM flag field */        /* at index decimal 20, there's a 32bit NTLM flag field */
139    
140          free(buffer);
141      }      }
142      else {      else {
143        if(ntlm->state >= NTLMSTATE_TYPE1)        if(ntlm->state >= NTLMSTATE_TYPE1)

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET