diff options
author | Daniel Stenberg <daniel@haxx.se> | 2009-05-10 21:33:55 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2009-05-10 21:33:55 +0000 |
commit | effbd99384242ab98acc5088363aab81f55688e8 (patch) | |
tree | ff2024b0818557ab559d38c3cbf55b1cc574ce06 /lib/http_digest.c | |
parent | d1ba4324de197a6011b3a07011638251a832bd7f (diff) | |
download | curl-effbd99384242ab98acc5088363aab81f55688e8.tar.gz |
- Andre Guibert de Bruet correctly pointed out an over-alloc with one wasted
byte in the digest code.
Diffstat (limited to 'lib/http_digest.c')
-rw-r--r-- | lib/http_digest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/http_digest.c b/lib/http_digest.c index b370891b7..7011b1947 100644 --- a/lib/http_digest.c +++ b/lib/http_digest.c @@ -543,8 +543,8 @@ CURLcode Curl_output_digest(struct connectdata *conn, *allocuserpwd = tmp; } - /* append CRLF to the userpwd header */ - tmp = realloc(*allocuserpwd, strlen(*allocuserpwd) + 3 + 1); + /* append CRLF + zero (3 bytes) to the userpwd header */ + tmp = realloc(*allocuserpwd, strlen(*allocuserpwd) + 3); if(!tmp) return CURLE_OUT_OF_MEMORY; strcat(tmp, "\r\n"); |