repositories
/
deb_libnfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b644665
)
nfs_normalize_path: don't strip trailing slash from "/"
author
Arne Redlich
<arne.redlich@googlemail.com>
Sun, 9 Mar 2014 20:55:42 +0000
(21:55 +0100)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Thu, 20 Mar 2014 23:58:32 +0000
(16:58 -0700)
Otherwise end up with a null string which is not permitted (RFC 1813, 3.2;
the code checks for it right after the now fixed nullification of "/").
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
lib/libnfs.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/libnfs.c
b/lib/libnfs.c
index a237f601387efce3838a6eff6a668592fb968603..9053ab1884992ff7b01287d8c5ac655c90e4fc6e 100644
(file)
--- a/
lib/libnfs.c
+++ b/
lib/libnfs.c
@@
-994,7
+994,7
@@
static int nfs_normalize_path(struct nfs_context *nfs, char *path)
/* /$ -> \0 */
len = strlen(path);
- if (len >
=
1) {
+ if (len > 1) {
if (path[len - 1] == '/') {
path[len - 1] = '\0';
len--;