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
59301023
Unverified
Commit
59301023
authored
Sep 04, 2018
by
Christian Brauner
Committed by
GitHub
Sep 04, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2585 from 2xsec/bugfix
caps: fix illegal access to array bound
parents
d3aba1db
b8bcbe9b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
10 deletions
+6
-10
caps.c
src/lxc/caps.c
+2
-4
nl.c
src/lxc/nl.c
+0
-3
seccomp.c
src/lxc/seccomp.c
+2
-1
utils.c
src/lxc/utils.c
+2
-2
No files found.
src/lxc/caps.c
View file @
59301023
...
...
@@ -296,15 +296,13 @@ static long int _real_caps_last_cap(void)
if
(
fd
>=
0
)
{
ssize_t
n
;
char
*
ptr
;
char
buf
[
INTTYPE_TO_STRLEN
(
int
)];
char
buf
[
INTTYPE_TO_STRLEN
(
int
)]
=
{
0
}
;
again:
n
=
read
(
fd
,
buf
,
sizeof
(
buf
));
n
=
read
(
fd
,
buf
,
sizeof
(
buf
)
-
1
);
if
(
n
<
0
&&
errno
==
EINTR
)
{
goto
again
;
}
else
if
(
n
>=
0
)
{
buf
[
n
]
=
'\0'
;
errno
=
0
;
result
=
strtol
(
buf
,
&
ptr
,
10
);
if
(
!
ptr
||
(
*
ptr
!=
'\0'
&&
*
ptr
!=
'\n'
)
||
errno
!=
0
)
...
...
src/lxc/nl.c
View file @
59301023
...
...
@@ -32,9 +32,6 @@
#include "nl.h"
#define NLMSG_TAIL(nmsg) \
((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
extern
size_t
nlmsg_len
(
const
struct
nlmsg
*
nlmsg
)
{
return
nlmsg
->
nlmsghdr
->
nlmsg_len
-
NLMSG_HDRLEN
;
...
...
src/lxc/seccomp.c
View file @
59301023
...
...
@@ -905,8 +905,9 @@ static int parse_config_v2(FILE *f, char *line, size_t *line_bufsz, struct lxc_c
}
cur_rule_arch
=
lxc_seccomp_arch_s390x
;
}
#endif
}
else
{
else
{
goto
bad_arch
;
}
...
...
src/lxc/utils.c
View file @
59301023
...
...
@@ -898,10 +898,10 @@ static char *get_nextpath(char *path, int *offsetp, int fulllen)
if
(
offset
>=
fulllen
)
return
NULL
;
while
(
path
[
offset
]
!=
'\0'
&&
offset
<
fulllen
)
while
(
offset
<
fulllen
&&
path
[
offset
]
!=
'\0'
)
offset
++
;
while
(
path
[
offset
]
==
'\0'
&&
offset
<
fulllen
)
while
(
offset
<
fulllen
&&
path
[
offset
]
==
'\0'
)
offset
++
;
*
offsetp
=
offset
;
...
...
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