fixed a segv bug when handling symlinks.
authorAndrew Tridgell <tridge@samba.org>
Thu, 2 Dec 1999 05:50:09 +0000 (05:50 +0000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 2 Dec 1999 05:50:09 +0000 (05:50 +0000)
thanks to taver@otenet.gr

generator.c

index 5321d8a..886c672 100644 (file)
@@ -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;
                                }