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
83078af5
Commit
83078af5
authored
Oct 13, 2006
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed sprintf() calls to snprintf().
parent
185aa5b0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
main.c
main.c
+2
-2
util.c
util.c
+2
-2
No files found.
main.c
View file @
83078af5
...
@@ -1258,7 +1258,7 @@ static RETSIGTYPE rsync_panic_handler(UNUSED(int whatsig))
...
@@ -1258,7 +1258,7 @@ static RETSIGTYPE rsync_panic_handler(UNUSED(int whatsig))
char
cmd_buf
[
300
];
char
cmd_buf
[
300
];
int
ret
;
int
ret
;
s
printf
(
cmd_buf
,
get_panic_action
(),
s
nprintf
(
cmd_buf
,
sizeof
cmd_buf
,
get_panic_action
(),
getpid
(),
getpid
());
getpid
(),
getpid
());
/* Unless we failed to execute gdb, we allow the process to
/* Unless we failed to execute gdb, we allow the process to
...
...
util.c
View file @
83078af5
...
@@ -359,7 +359,7 @@ int robust_unlink(const char *fname)
...
@@ -359,7 +359,7 @@ int robust_unlink(const char *fname)
/* start where the last one left off to reduce chance of clashes */
/* start where the last one left off to reduce chance of clashes */
start
=
counter
;
start
=
counter
;
do
{
do
{
s
printf
(
&
path
[
pos
]
,
"%03d"
,
counter
);
s
nprintf
(
&
path
[
pos
],
4
,
"%03d"
,
counter
);
if
(
++
counter
>=
MAX_RENAMES
)
if
(
++
counter
>=
MAX_RENAMES
)
counter
=
1
;
counter
=
1
;
}
while
((
rc
=
access
(
path
,
0
))
==
0
&&
counter
!=
start
);
}
while
((
rc
=
access
(
path
,
0
))
==
0
&&
counter
!=
start
);
...
@@ -1115,7 +1115,7 @@ char *human_num(int64 num)
...
@@ -1115,7 +1115,7 @@ char *human_num(int64 num)
units
=
'K'
;
units
=
'K'
;
}
}
if
(
units
)
{
if
(
units
)
{
s
printf
(
bufs
[
n
],
"%.2f%c"
,
dnum
,
units
);
s
nprintf
(
bufs
[
n
],
sizeof
bufs
[
0
],
"%.2f%c"
,
dnum
,
units
);
return
bufs
[
n
];
return
bufs
[
n
];
}
}
}
}
...
...
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