projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b433e4a
)
Make sure that the user and domain strings fit in the target buffer before we
author
Daniel Stenberg
<daniel@haxx.se>
Thu, 13 Oct 2005 07:57:51 +0000
(07:57 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Thu, 13 Oct 2005 07:57:51 +0000
(07:57 +0000)
copy them there.
lib/http_ntlm.c
patch
|
blob
|
history
diff --git
a/lib/http_ntlm.c
b/lib/http_ntlm.c
index
3e993cb
..
a64f611
100644
(file)
--- a/
lib/http_ntlm.c
+++ b/
lib/http_ntlm.c
@@
-713,6
+713,13
@@
CURLcode Curl_output_ntlm(struct connectdata *conn,
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)) {
+ failf(conn->data, "user + domain name too big");
+ return CURLE_OUT_OF_MEMORY;
+ }
+
memcpy(&ntlmbuf[size], domain, domlen);
size += domlen;