Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1848fd6
)
If adding a trailing dot to a directory name overflows
author
Wayne Davison
<wayned@samba.org>
Fri, 13 May 2005 22:02:24 +0000
(22:02 +0000)
committer
Wayne Davison
<wayned@samba.org>
Fri, 13 May 2005 22:02:24 +0000
(22:02 +0000)
MAXPATHLEN, die with an overflow error.
flist.c
patch
|
blob
|
blame
|
history
diff --git
a/flist.c
b/flist.c
index
29d75ca
..
b3c966e
100644
(file)
--- a/
flist.c
+++ b/
flist.c
@@
-1120,7
+1120,9
@@
struct file_list *send_file_list(int f, int argc, char *argv[])
if (l == 2 && fname[0] == '.') {
/* Turn "./" into just "." rather than "./." */
fname[1] = '\0';
- } else if (l < MAXPATHLEN) {
+ } else {
+ if (l + 1 >= MAXPATHLEN)
+ overflow("send_file_list");
fname[l++] = '.';
fname[l] = '\0';
}