Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
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
zhul
criu
Commits
11fc4758
Commit
11fc4758
authored
Aug 19, 2014
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
signals: Sanitize j loop control variable
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
f9ebd183
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
cr-dump.c
cr-dump.c
+5
-4
No files found.
cr-dump.c
View file @
11fc4758
...
...
@@ -1162,7 +1162,7 @@ err:
static
int
dump_signal_queue
(
pid_t
tid
,
SignalQueueEntry
**
sqe
,
bool
group
)
{
struct
ptrace_peeksiginfo_args
arg
;
int
ret
,
j
;
int
ret
;
SignalQueueEntry
*
queue
=
NULL
;
pr_debug
(
"Dump %s signals of %d
\n
"
,
group
?
"shared"
:
"private"
,
tid
);
...
...
@@ -1180,7 +1180,7 @@ static int dump_signal_queue(pid_t tid, SignalQueueEntry **sqe, bool group)
signal_queue_entry__init
(
queue
);
for
(;
;
)
{
int
nr
;
int
nr
,
si_pos
;
siginfo_t
*
si
;
si
=
xmalloc
(
SI_BATCH
*
sizeof
(
*
si
));
...
...
@@ -1209,7 +1209,8 @@ static int dump_signal_queue(pid_t tid, SignalQueueEntry **sqe, bool group)
break
;
}
for
(
j
=
queue
->
n_signals
-
nr
;
j
<
queue
->
n_signals
;
j
++
)
{
for
(
si_pos
=
queue
->
n_signals
-
nr
;
si_pos
<
queue
->
n_signals
;
si_pos
++
)
{
SiginfoEntry
*
se
;
se
=
xmalloc
(
sizeof
(
*
se
));
...
...
@@ -1223,7 +1224,7 @@ static int dump_signal_queue(pid_t tid, SignalQueueEntry **sqe, bool group)
se
->
siginfo
.
data
=
(
void
*
)
si
++
;
/* XXX we don't free cores, but when
* we will, this would cause problems
*/
queue
->
signals
[
j
]
=
se
;
queue
->
signals
[
si_pos
]
=
se
;
}
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