]> granicus.if.org Git - curl/commitdiff
make sure the string is long enough
authorDaniel Stenberg <daniel@haxx.se>
Fri, 8 Aug 2003 17:56:47 +0000 (17:56 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 8 Aug 2003 17:56:47 +0000 (17:56 +0000)
lib/file.c

index f4cd5f2f8b7418862fc633f1b6cd36b54bcf591b..4e08c03bcda90934e15b67503d89ab2e8eaf48a5 100644 (file)
@@ -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] = ':';