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
cabd60fd
Commit
cabd60fd
authored
Oct 13, 2006
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Changed some sprintf() calls to snprintf() calls.
- Changed two last strcpy() calls to strlcpy() calls.
parent
10944395
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
flist.c
flist.c
+5
-5
No files found.
flist.c
View file @
cabd60fd
...
@@ -1700,15 +1700,15 @@ static void output_flist(struct file_list *flist)
...
@@ -1700,15 +1700,15 @@ static void output_flist(struct file_list *flist)
for
(
i
=
0
;
i
<
flist
->
count
;
i
++
)
{
for
(
i
=
0
;
i
<
flist
->
count
;
i
++
)
{
file
=
flist
->
files
[
i
];
file
=
flist
->
files
[
i
];
if
((
am_root
||
am_sender
)
&&
preserve_uid
)
if
((
am_root
||
am_sender
)
&&
preserve_uid
)
s
printf
(
uidbuf
,
" uid=%ld"
,
(
long
)
file
->
uid
);
s
nprintf
(
uidbuf
,
sizeof
uidbuf
,
" uid=%ld"
,
(
long
)
file
->
uid
);
else
else
*
uidbuf
=
'\0'
;
*
uidbuf
=
'\0'
;
if
(
preserve_gid
&&
file
->
gid
!=
GID_NONE
)
if
(
preserve_gid
&&
file
->
gid
!=
GID_NONE
)
s
printf
(
gidbuf
,
" gid=%ld"
,
(
long
)
file
->
gid
);
s
nprintf
(
gidbuf
,
sizeof
gidbuf
,
" gid=%ld"
,
(
long
)
file
->
gid
);
else
else
*
gidbuf
=
'\0'
;
*
gidbuf
=
'\0'
;
if
(
!
am_sender
)
if
(
!
am_sender
)
s
printf
(
depthbuf
,
"%d"
,
file
->
dir
.
depth
);
s
nprintf
(
depthbuf
,
sizeof
depthbuf
,
"%d"
,
file
->
dir
.
depth
);
rprintf
(
FINFO
,
"[%s] i=%d %s %s%s%s%s mode=0%o len=%.0f%s%s flags=%x
\n
"
,
rprintf
(
FINFO
,
"[%s] i=%d %s %s%s%s%s mode=0%o len=%.0f%s%s flags=%x
\n
"
,
who
,
i
,
am_sender
?
NS
(
file
->
dir
.
root
)
:
depthbuf
,
who
,
i
,
am_sender
?
NS
(
file
->
dir
.
root
)
:
depthbuf
,
file
->
dirname
?
file
->
dirname
:
""
,
file
->
dirname
?
file
->
dirname
:
""
,
...
@@ -1876,9 +1876,9 @@ char *f_name(struct file_struct *f, char *fbuf)
...
@@ -1876,9 +1876,9 @@ char *f_name(struct file_struct *f, char *fbuf)
int
len
=
strlen
(
f
->
dirname
);
int
len
=
strlen
(
f
->
dirname
);
memcpy
(
fbuf
,
f
->
dirname
,
len
);
memcpy
(
fbuf
,
f
->
dirname
,
len
);
fbuf
[
len
]
=
'/'
;
fbuf
[
len
]
=
'/'
;
str
cpy
(
fbuf
+
len
+
1
,
f
->
basename
);
str
lcpy
(
fbuf
+
len
+
1
,
f
->
basename
,
MAXPATHLEN
-
(
len
+
1
)
);
}
else
}
else
str
cpy
(
fbuf
,
f
->
basename
);
str
lcpy
(
fbuf
,
f
->
basename
,
MAXPATHLEN
);
return
fbuf
;
return
fbuf
;
}
}
...
...
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