Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
306ffb8c
Commit
306ffb8c
authored
Jan 31, 2004
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A small optimization to the symlink-send code, and an extra sanity
check to the symlink-receive code.
parent
0a982011
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
flist.c
flist.c
+8
-7
No files found.
flist.c
View file @
306ffb8c
...
...
@@ -490,8 +490,9 @@ void send_file_entry(struct file_struct *file, int f, unsigned short base_flags)
#if SUPPORT_LINKS
if
(
preserve_links
&&
S_ISLNK
(
mode
))
{
write_int
(
f
,
strlen
(
file
->
u
.
link
));
write_buf
(
f
,
file
->
u
.
link
,
strlen
(
file
->
u
.
link
));
int
len
=
strlen
(
file
->
u
.
link
);
write_int
(
f
,
len
);
write_buf
(
f
,
file
->
u
.
link
,
len
);
}
#endif
...
...
@@ -643,14 +644,14 @@ void receive_file_entry(struct file_struct **fptr, unsigned short flags, int f)
}
if
(
preserve_links
&&
S_ISLNK
(
mode
))
{
int
l
=
read_int
(
f
);
if
(
l
<
0
)
{
rprintf
(
FERROR
,
"overflow: l
=%d
\n
"
,
l
);
int
l
en
=
read_int
(
f
);
if
(
l
en
<
0
||
len
>=
MAXPATHLEN
)
{
rprintf
(
FERROR
,
"overflow: l
en=%d
\n
"
,
len
);
overflow
(
"receive_file_entry"
);
}
if
(
!
(
file
->
u
.
link
=
new_array
(
char
,
l
+
1
)))
if
(
!
(
file
->
u
.
link
=
new_array
(
char
,
l
en
+
1
)))
out_of_memory
(
"receive_file_entry 2"
);
read_sbuf
(
f
,
file
->
u
.
link
,
l
);
read_sbuf
(
f
,
file
->
u
.
link
,
l
en
);
if
(
sanitize_paths
)
sanitize_path
(
file
->
u
.
link
,
file
->
dirname
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment