Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
3cec50fc
Unverified
Commit
3cec50fc
authored
Mar 27, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
string_utils: always memset buf in lxc_safe_int64_residual()
Link:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32482
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
b4733289
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
string_utils.c
src/lxc/string_utils.c
+3
-3
No files found.
src/lxc/string_utils.c
View file @
3cec50fc
...
@@ -677,6 +677,8 @@ int lxc_safe_int64_residual(const char *numstr, int64_t *converted, int base, ch
...
@@ -677,6 +677,8 @@ int lxc_safe_int64_residual(const char *numstr, int64_t *converted, int base, ch
if
(
!
residual
&&
residual_len
!=
0
)
if
(
!
residual
&&
residual_len
!=
0
)
return
ret_errno
(
EINVAL
);
return
ret_errno
(
EINVAL
);
memset
(
residual
,
0
,
residual_len
);
while
(
isspace
(
*
numstr
))
while
(
isspace
(
*
numstr
))
numstr
++
;
numstr
++
;
...
@@ -691,10 +693,8 @@ int lxc_safe_int64_residual(const char *numstr, int64_t *converted, int base, ch
...
@@ -691,10 +693,8 @@ int lxc_safe_int64_residual(const char *numstr, int64_t *converted, int base, ch
if
(
residual
)
{
if
(
residual
)
{
size_t
len
=
0
;
size_t
len
=
0
;
if
(
*
remaining
==
'\0'
)
{
if
(
*
remaining
==
'\0'
)
memset
(
residual
,
0
,
residual_len
);
goto
out
;
goto
out
;
}
len
=
strlen
(
remaining
);
len
=
strlen
(
remaining
);
if
(
len
>=
residual_len
)
if
(
len
>=
residual_len
)
...
...
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