From effbd99384242ab98acc5088363aab81f55688e8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 10 May 2009 21:33:55 +0000 Subject: - Andre Guibert de Bruet correctly pointed out an over-alloc with one wasted byte in the digest code. --- lib/http_digest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/http_digest.c') 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"); -- cgit v1.2.3