diff options
Diffstat (limited to 'www/curl/patches/patch-aa')
-rw-r--r-- | www/curl/patches/patch-aa | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/www/curl/patches/patch-aa b/www/curl/patches/patch-aa new file mode 100644 index 00000000000..f07e80ddf74 --- /dev/null +++ b/www/curl/patches/patch-aa @@ -0,0 +1,33 @@ +$NetBSD: patch-aa,v 1.7.10.1 2005/02/26 07:25:30 snj Exp $ +--- lib/http_ntlm.c.orig 2004-07-29 15:09:58.000000000 +0200 ++++ lib/http_ntlm.c 2005-02-25 02:02:10.000000000 +0100 +@@ -103,7 +103,6 @@ + header++; + + if(checkprefix("NTLM", header)) { +- unsigned char buffer[256]; + header += strlen("NTLM"); + + while(*header && isspace((int)*header)) +@@ -123,8 +122,12 @@ + (40) Target Information (optional) security buffer(*) + 32 (48) start of data block + */ ++ size_t size; ++ unsigned char *buffer = (unsigned char *)malloc(strlen(header)); ++ if (buffer == NULL) ++ return CURLNTLM_BAD; + +- size_t size = Curl_base64_decode(header, (char *)buffer); ++ size = Curl_base64_decode(header, (char *)buffer); + + ntlm->state = NTLMSTATE_TYPE2; /* we got a type-2 */ + +@@ -134,6 +137,7 @@ + + /* at index decimal 20, there's a 32bit NTLM flag field */ + ++ free(buffer); + } + else { + if(ntlm->state >= NTLMSTATE_TYPE1) |