[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 211/254: dedotdot: fixed output for ".." and "." on
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 211/254: dedotdot: fixed output for ".." and "." only input |
Date: |
Sat, 17 Jun 2017 16:54:03 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.54.1
in repository gnurl.
commit cfd3e8f399c2bb2a7fdc51f01ddc12548b4f3892
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Jun 2 17:50:45 2017 +0200
dedotdot: fixed output for ".." and "." only input
Found when updating test 1395, which I did to increase test coverage of
this source file...
Closes #1535
---
lib/dotdot.c | 3 ++-
tests/unit/unit1395.c | 9 ++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/lib/dotdot.c b/lib/dotdot.c
index ea7c8a04f..20603bcab 100644
--- a/lib/dotdot.c
+++ b/lib/dotdot.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -147,6 +147,7 @@ char *Curl_dedotdotify(const char *input)
else if(!strcmp(".", clone) || !strcmp("..", clone)) {
*clone=0;
+ *out=0;
}
else {
diff --git a/tests/unit/unit1395.c b/tests/unit/unit1395.c
index ba8e14f45..13ea97bc4 100644
--- a/tests/unit/unit1395.c
+++ b/tests/unit/unit1395.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -65,6 +65,13 @@ UNITTEST_START
{ "/", "/" },
{ "", "" },
{ "/.../", "/.../" },
+ { "./moo", "moo" },
+ { "../moo", "moo" },
+ { "/.", "/" },
+ { "/..", "/" },
+ { "/moo/..", "/" },
+ { "..", "" },
+ { ".", "" },
};
for(i=0; i < sizeof(pairs)/sizeof(pairs[0]); i++) {
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 200/254: typecheck-gcc.h: separate getinfo slist checks from other pointers, (continued)
- [GNUnet-SVN] [gnurl] 200/254: typecheck-gcc.h: separate getinfo slist checks from other pointers, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 218/254: libtest: fix int-in-bool-context warnings, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 244/254: RELEASE-PROCEDURE: updated future release dates, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 249/254: urlglob: fix division by zero, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 175/254: opts: more examples added in option man pages, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 251/254: libressl: OCSP and intermediate certs workaround no longer needed, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 80/254: typecheck-gcc: add support for CURLINFO_SOCKET, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 104/254: tftp: silence bad-function-cast warning, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 107/254: sendrecv: fix MinGW-w64 warning, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 152/254: ssh: ignore timeouts during disconnect, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 211/254: dedotdot: fixed output for ".." and "." only input,
gnunet <=
- [GNUnet-SVN] [gnurl] 206/254: curl_endian: remove unused functions, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 169/254: examples: fix Wimplicit-fallthrough warnings, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 158/254: cmake: remove CURL_CA_BUNDLE from cmake TODO, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 178/254: RELEASE-NOTES: synced with 3aaac8c2f, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 202/254: typecheck-gcc.h: check CURLINFO_CERTINFO, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 230/254: test1521: make the code < 80 columns wide, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 72/254: ssh: fix compiler warning from e40e9d7f0de, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 50/254: curl_setup: Ensure no more than one IDN lib is enabled, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 120/254: formboundary: convert assert into run-time check, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 114/254: tool_msgs: remove wrong cast, gnunet, 2017/06/17