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
e6d15fca
Unverified
Commit
e6d15fca
authored
Mar 26, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
confile: don't leak memory when overwriting lxc.rootfs.options
Link:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32473
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
b4d341d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
confile.c
src/lxc/confile.c
+7
-3
No files found.
src/lxc/confile.c
View file @
e6d15fca
...
...
@@ -2465,6 +2465,10 @@ static int set_config_rootfs_options(const char *key, const char *value,
struct
lxc_rootfs
*
rootfs
=
&
lxc_conf
->
rootfs
;
int
ret
;
clr_config_rootfs_options
(
key
,
lxc_conf
,
data
);
if
(
lxc_config_value_empty
(
value
))
return
0
;
ret
=
parse_mntopts
(
value
,
&
mflags
,
&
mdata
);
if
(
ret
<
0
)
return
ret_errno
(
EINVAL
);
...
...
@@ -2477,9 +2481,9 @@ static int set_config_rootfs_options(const char *key, const char *value,
if
(
ret
<
0
)
return
ret_errno
(
ENOMEM
);
rootfs
->
mountflags
=
mflags
|
pflags
;
rootfs
->
options
=
move_ptr
(
opts
);
rootfs
->
data
=
move_ptr
(
mdata
);
rootfs
->
mountflags
=
mflags
|
pflags
;
rootfs
->
options
=
move_ptr
(
opts
);
rootfs
->
data
=
move_ptr
(
mdata
);
return
0
;
}
...
...
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