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
0a0a4a6f
Unverified
Commit
0a0a4a6f
authored
May 15, 2018
by
Stéphane Graber
Committed by
GitHub
May 15, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2327 from brauner/2018-05-15/coverity
coverity
parents
e8a10866
4b812aca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
network.c
src/lxc/network.c
+3
-1
btrfs.c
src/lxc/storage/btrfs.c
+5
-1
No files found.
src/lxc/network.c
View file @
0a0a4a6f
...
@@ -1916,8 +1916,10 @@ int lxc_bridge_attach(const char *bridge, const char *ifname)
...
@@ -1916,8 +1916,10 @@ int lxc_bridge_attach(const char *bridge, const char *ifname)
return
-
errno
;
return
-
errno
;
retlen
=
strlcpy
(
ifr
.
ifr_name
,
bridge
,
IFNAMSIZ
);
retlen
=
strlcpy
(
ifr
.
ifr_name
,
bridge
,
IFNAMSIZ
);
if
(
retlen
>=
IFNAMSIZ
)
if
(
retlen
>=
IFNAMSIZ
)
{
close
(
fd
);
return
-
E2BIG
;
return
-
E2BIG
;
}
ifr
.
ifr_name
[
IFNAMSIZ
-
1
]
=
'\0'
;
ifr
.
ifr_name
[
IFNAMSIZ
-
1
]
=
'\0'
;
ifr
.
ifr_ifindex
=
index
;
ifr
.
ifr_ifindex
=
index
;
...
...
src/lxc/storage/btrfs.c
View file @
0a0a4a6f
...
@@ -254,8 +254,11 @@ static int btrfs_subvolume_create(const char *path)
...
@@ -254,8 +254,11 @@ static int btrfs_subvolume_create(const char *path)
memset
(
&
args
,
0
,
sizeof
(
args
));
memset
(
&
args
,
0
,
sizeof
(
args
));
retlen
=
strlcpy
(
args
.
name
,
p
+
1
,
BTRFS_SUBVOL_NAME_MAX
);
retlen
=
strlcpy
(
args
.
name
,
p
+
1
,
BTRFS_SUBVOL_NAME_MAX
);
if
(
retlen
>=
BTRFS_SUBVOL_NAME_MAX
)
if
(
retlen
>=
BTRFS_SUBVOL_NAME_MAX
)
{
free
(
newfull
);
close
(
fd
);
return
-
E2BIG
;
return
-
E2BIG
;
}
ret
=
ioctl
(
fd
,
BTRFS_IOC_SUBVOL_CREATE
,
&
args
);
ret
=
ioctl
(
fd
,
BTRFS_IOC_SUBVOL_CREATE
,
&
args
);
saved_errno
=
errno
;
saved_errno
=
errno
;
...
@@ -533,6 +536,7 @@ static int btrfs_do_destroy_subvol(const char *path)
...
@@ -533,6 +536,7 @@ static int btrfs_do_destroy_subvol(const char *path)
retlen
=
strlcpy
(
args
.
name
,
p
+
1
,
BTRFS_SUBVOL_NAME_MAX
);
retlen
=
strlcpy
(
args
.
name
,
p
+
1
,
BTRFS_SUBVOL_NAME_MAX
);
if
(
retlen
>=
BTRFS_SUBVOL_NAME_MAX
)
{
if
(
retlen
>=
BTRFS_SUBVOL_NAME_MAX
)
{
free
(
newfull
);
free
(
newfull
);
close
(
fd
);
return
-
E2BIG
;
return
-
E2BIG
;
}
}
...
...
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