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
b695eea2
Unverified
Commit
b695eea2
authored
Jun 14, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coverity: #1425768
Untrusted array index read Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
76c00d39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
state.c
src/lxc/state.c
+6
-1
No files found.
src/lxc/state.c
View file @
b695eea2
...
...
@@ -104,7 +104,7 @@ static int fillwaitedstates(const char *strstates, lxc_state_t *states)
extern
int
lxc_wait
(
const
char
*
lxcname
,
const
char
*
states
,
int
timeout
,
const
char
*
lxcpath
)
{
int
state
;
int
state
=
-
1
;
lxc_state_t
s
[
MAX_STATE
]
=
{
0
};
if
(
fillwaitedstates
(
states
,
s
))
...
...
@@ -129,6 +129,11 @@ extern int lxc_wait(const char *lxcname, const char *states, int timeout,
sleep
(
1
);
}
if
(
state
<
0
)
{
ERROR
(
"Failed to retrieve state from monitor"
);
return
-
1
;
}
TRACE
(
"Retrieved state of container %s"
,
lxc_state2str
(
state
));
if
(
!
s
[
state
])
return
-
1
;
...
...
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