diff options
author | Andrew Tridgell <tridge@samba.org> | 1997-12-15 21:35:37 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1997-12-15 21:35:37 +0000 |
commit | 13a1f7929ed05c652dc1b3eb4489ced01c8616f1 (patch) | |
tree | 610349bdf085868f7a49a07614b709094b20136a /exclude.c | |
parent | e92338c82deba1576d23f22e11d95b0b34432e08 (diff) | |
download | rsync-13a1f7929ed05c652dc1b3eb4489ced01c8616f1.tar.gz |
some people are now using rsync as a public server, using various
patches or wrappers. One problem with this is that rsync was not
written with this in mind and wasn't very careful about possible stack
overflows etc which could lead to security breaches. This wasn't a
problem when run in the traditional way as any user that can run rsync
can login anyway and cause much more damage that way.
This patch attempts to close possible stack overflow problems. I've
checked for all strcpy(), strcat(), sprintf() and memcpy()
overflows. I would appreciate it if someone else with a devious mind
could also go through the rsync source code and see if there are any
other stack overflows possible. Let me know if you do.
Diffstat (limited to 'exclude.c')
-rw-r--r-- | exclude.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -188,7 +188,7 @@ void add_cvs_excludes(void) for (i=0; cvs_ignore_list[i]; i++) add_exclude(cvs_ignore_list[i]); - if ((p=getenv("HOME"))) { + if ((p=getenv("HOME")) && strlen(p) < (MAXPATHLEN-12)) { sprintf(fname,"%s/.cvsignore",p); add_exclude_file(fname,0); } |