Skip to content

CID 1508982: Argument cannot be negative #10225

Description

@maskit
115      while (read_len > 1 && key_data[read_len - 1] == '\n') {
116        --read_len;
117      }
118      memset(retKeyBuff, 0, buffSize);
     	CID 1508997: Out-of-bounds access (OVERRUN) [[select issue](https://scan6.scan.coverity.com/defectInstanceId=34625595&fileInstanceId=157339969&mergedDefectId=1508997)]
   	
CID 1508982 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS)
6. negative_returns: read_len is passed to a parameter that cannot be negative.
119      strncpy(retKeyBuff, key_data.c_str(), read_len);
120      retval = key_data.length();
121    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions