summaryrefslogtreecommitdiff
path: root/generator.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1999-12-02 05:50:09 +0000
committerAndrew Tridgell <tridge@samba.org>1999-12-02 05:50:09 +0000
commit7f931a000240b28cb6495c5ab2d28851ca4bc807 (patch)
tree24559626734191486764924ffe9f442886f84833 /generator.c
parent07b7c86c0672c38648fb715efbc0bfffd81ed182 (diff)
downloadrsync-7f931a000240b28cb6495c5ab2d28851ca4bc807.tar.gz
fixed a segv bug when handling symlinks.
thanks to taver@otenet.gr
Diffstat (limited to 'generator.c')
-rw-r--r--generator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generator.c b/generator.c
index 5321d8a2..886c6723 100644
--- a/generator.c
+++ b/generator.c
@@ -234,7 +234,7 @@ void recv_generator(char *fname,struct file_list *flist,int i,int f_out)
l = readlink(fname,lnk,MAXPATHLEN-1);
if (l > 0) {
lnk[l] = 0;
- if (strcmp(lnk,file->link) == 0) {
+ if (file->link && strcmp(lnk,file->link) == 0) {
set_perms(fname,file,&st,1);
return;
}