mirror of
https://github.com/xzeldon/htop.git
synced 2025-02-17 00:13:24 +03:00
Add DeepCode inline suppression
commsize is bounded by the allocated length passed in by commLen, saved into commLenIn
This commit is contained in:
parent
f4bb50294a
commit
594409f299
@ -261,6 +261,7 @@ static bool LinuxProcessList_readStatFile(Process *process, const char* dirname,
|
|||||||
if (!end) return false;
|
if (!end) return false;
|
||||||
|
|
||||||
int commsize = MINIMUM(end - location, commLenIn - 1);
|
int commsize = MINIMUM(end - location, commLenIn - 1);
|
||||||
|
// deepcode ignore BufferOverflow: commsize is bounded by the allocated length passed in by commLen, saved into commLenIn
|
||||||
memcpy(command, location, commsize);
|
memcpy(command, location, commsize);
|
||||||
command[commsize] = '\0';
|
command[commsize] = '\0';
|
||||||
*commLen = commsize;
|
*commLen = commsize;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user