diff options
| -rw-r--r-- | lib/dotdot.c | 2 | ||||
| -rw-r--r-- | tests/libtest/lib1560.c | 3 | 
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/dotdot.c b/lib/dotdot.c index cbb308d78..2c6177aea 100644 --- a/lib/dotdot.c +++ b/lib/dotdot.c @@ -62,6 +62,8 @@ char *Curl_dedotdotify(const char *input)    if(!out)      return NULL; /* out of memory */ +  *out = 0; /* zero terminates, for inputs like "./" */ +    /* get a cloned copy of the input */    clone = strdup(input);    if(!clone) { diff --git a/tests/libtest/lib1560.c b/tests/libtest/lib1560.c index 7a5be812a..e0faa12b2 100644 --- a/tests/libtest/lib1560.c +++ b/tests/libtest/lib1560.c @@ -300,6 +300,9 @@ static struct urltestcase get_url_list[] = {    {"file:///file.txt",     "file:///file.txt",     0, 0, CURLUE_OK}, +  {"file:./", +   "file://", +   0, 0, CURLUE_MALFORMED_INPUT},    {"http://example.com/hello/../here",     "http://example.com/hello/../here",     CURLU_PATH_AS_IS, 0, CURLUE_OK},  | 
