From: Daniel Stenberg Date: Fri, 8 Aug 2003 17:56:47 +0000 (+0000) Subject: make sure the string is long enough X-Git-Tag: curl-7_10_7~76 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=514a8739b669fa473560559a5cae225634bcc2f5;p=curl make sure the string is long enough --- diff --git a/lib/file.c b/lib/file.c index f4cd5f2f8..4e08c03bc 100644 --- a/lib/file.c +++ b/lib/file.c @@ -125,7 +125,8 @@ CURLcode Curl_file_connect(struct connectdata *conn) with a drive letter. */ actual_path = real_path; - if (*actual_path == '/' && + if ((actual_path[0] == '/') && + actual_path[1] && (actual_path[2] == ':' || actual_path[2] == '|')) { actual_path[2] = ':';