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
9793bbb3
Commit
9793bbb3
authored
Mar 26, 2008
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved a length check in parse_merge_name().
parent
f6f74b93
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
exclude.c
exclude.c
+4
-3
No files found.
exclude.c
View file @
9793bbb3
...
@@ -332,12 +332,13 @@ static char *parse_merge_name(const char *merge_file, unsigned int *len_ptr,
...
@@ -332,12 +332,13 @@ static char *parse_merge_name(const char *merge_file, unsigned int *len_ptr,
/* If the name isn't in buf yet, it's wasn't absolute. */
/* If the name isn't in buf yet, it's wasn't absolute. */
if
(
fn
!=
buf
)
{
if
(
fn
!=
buf
)
{
if
(
dirbuf_len
+
fn_len
>=
MAXPATHLEN
)
{
int
d_len
=
dirbuf_len
-
prefix_skip
;
if
(
d_len
+
fn_len
>=
MAXPATHLEN
)
{
rprintf
(
FERROR
,
"merge-file name overflows: %s
\n
"
,
fn
);
rprintf
(
FERROR
,
"merge-file name overflows: %s
\n
"
,
fn
);
return
NULL
;
return
NULL
;
}
}
memcpy
(
buf
,
dirbuf
+
prefix_skip
,
d
irbuf_len
-
prefix_skip
);
memcpy
(
buf
,
dirbuf
+
prefix_skip
,
d
_len
);
memcpy
(
buf
+
d
irbuf_len
-
prefix_skip
,
fn
,
fn_len
+
1
);
memcpy
(
buf
+
d
_len
,
fn
,
fn_len
+
1
);
fn_len
=
clean_fname
(
buf
,
CFN_COLLAPSE_DOT_DOT_DIRS
);
fn_len
=
clean_fname
(
buf
,
CFN_COLLAPSE_DOT_DOT_DIRS
);
}
}
...
...
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