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
bad943c4
Unverified
Commit
bad943c4
authored
Dec 12, 2017
by
Christian Brauner
Committed by
GitHub
Dec 12, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2021 from 3XX0/overlay-oob-copy
overlay: fix out-of-bounds copy
parents
f449521c
fe348547
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
overlay.c
src/lxc/storage/overlay.c
+1
-4
No files found.
src/lxc/storage/overlay.c
View file @
bad943c4
...
@@ -410,15 +410,12 @@ int ovl_create(struct lxc_storage *bdev, const char *dest, const char *n,
...
@@ -410,15 +410,12 @@ int ovl_create(struct lxc_storage *bdev, const char *dest, const char *n,
return
-
1
;
return
-
1
;
}
}
delta
=
malloc
(
len
+
1
);
delta
=
strdup
(
dest
);
if
(
!
delta
)
{
if
(
!
delta
)
{
ERROR
(
"Failed to allocate memory"
);
ERROR
(
"Failed to allocate memory"
);
return
-
1
;
return
-
1
;
}
}
memcpy
(
delta
,
dest
,
len
);
memcpy
(
delta
+
len
-
6
,
"delta0"
,
sizeof
(
"delta0"
)
-
1
);
memcpy
(
delta
+
len
-
6
,
"delta0"
,
sizeof
(
"delta0"
)
-
1
);
delta
[
len
+
sizeof
(
"delta0"
)]
=
'\0'
;
ret
=
mkdir_p
(
delta
,
0755
);
ret
=
mkdir_p
(
delta
,
0755
);
if
(
ret
<
0
)
{
if
(
ret
<
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