Add DeepCode inline suppression

commsize is bounded by the allocated length passed in by commLen, saved
into commLenIn
This commit is contained in:
Christian Göttsche 2020-09-24 19:52:08 +02:00 committed by cgzones
parent f4bb50294a
commit 594409f299
1 changed files with 1 additions and 0 deletions

View File

@ -261,6 +261,7 @@ static bool LinuxProcessList_readStatFile(Process *process, const char* dirname,
if (!end) return false;
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);
command[commsize] = '\0';
*commLen = commsize;