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
448797a1
Commit
448797a1
authored
Feb 05, 2005
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed an off-by-one error in the prefix-length checking in
get_rule_prefix().
parent
a261103c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
exclude.c
exclude.c
+7
-6
No files found.
exclude.c
View file @
448797a1
...
...
@@ -973,15 +973,13 @@ char *get_rule_prefix(int match_flags, const char *pat, int for_xfer,
}
if
(
match_flags
&
MATCHFLG_EXCLUDE_SELF
)
*
op
++
=
'e'
;
if
(
op
-
buf
>
legal_len
)
return
NULL
;
if
(
legal_len
)
*
op
++
=
' '
;
if
(
op
-
buf
>
legal_len
)
return
NULL
;
*
op
=
'\0'
;
if
(
plen_ptr
)
*
plen_ptr
=
op
-
buf
;
if
(
op
-
buf
>
MAX_RULE_PREFIX
)
overflow
(
"get_rule_prefix"
);
return
buf
;
}
...
...
@@ -1022,7 +1020,9 @@ static void send_rules(int f_out, struct filter_list_struct *flp)
/* This is only called by the client. */
void
send_filter_list
(
int
f_out
)
{
if
(
local_server
||
(
am_sender
&&
(
!
delete_mode
||
delete_excluded
)))
int
receiver_wants_list
=
delete_mode
&&
!
delete_excluded
;
if
(
local_server
||
(
am_sender
&&
!
receiver_wants_list
))
f_out
=
-
1
;
if
(
cvs_exclude
&&
am_sender
)
{
if
(
protocol_version
>=
29
)
...
...
@@ -1054,8 +1054,9 @@ void recv_filter_list(int f_in)
char
line
[
MAXPATHLEN
+
MAX_RULE_PREFIX
+
1
];
/* +1 for trailing slash. */
int
xflags
=
protocol_version
>=
29
?
0
:
XFLG_OLD_PREFIXES
;
unsigned
int
len
;
int
receiver_wants_list
=
delete_mode
&&
!
delete_excluded
;
if
(
!
local_server
&&
(
am_sender
||
(
delete_mode
&&
!
delete_excluded
)
))
{
if
(
!
local_server
&&
(
am_sender
||
receiver_wants_list
))
{
while
((
len
=
read_int
(
f_in
))
!=
0
)
{
if
(
len
>=
sizeof
line
)
overflow
(
"recv_rules"
);
...
...
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