Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
0b704393
Commit
0b704393
authored
Feb 13, 2016
by
Hisham
Browse files
Fix buffer reuse.
parent
e9b32eb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
linux/LinuxProcessList.c
View file @
0b704393
...
...
@@ -446,7 +446,7 @@ static void LinuxProcessList_readOomData(LinuxProcess* process, const char* dirn
}
static
void
setCommand
(
Process
*
process
,
const
char
*
command
,
int
len
)
{
if
(
process
->
comm
&&
process
->
commLen
<
=
len
)
{
if
(
process
->
comm
&&
process
->
commLen
>
=
len
)
{
strncpy
(
process
->
comm
,
command
,
len
+
1
);
}
else
{
free
(
process
->
comm
);
...
...
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