Skip to content

CID 1508975: Argument cannot be negative #10228

Description

@maskit
101int
102get_redis_auth_key(char *retKeyBuff, int buffSize)
103{
104  int retval = 0;
105  // Get the Key
   	1. Condition ssl_param.redis_auth_key_file.length(), taking true branch.
106  if (ssl_param.redis_auth_key_file.length()) {
   	2. negative_return_fn: Function open(ssl_param.redis_auth_key_file.c_str(), 0) returns a negative number.
   	3. assign: Assigning: fd = open(ssl_param.redis_auth_key_file.c_str(), 0).
107    int fd = open(ssl_param.redis_auth_key_file.c_str(), O_RDONLY);
108    struct stat info;
   	
CID 1508975 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS)
4. negative_returns: fd is passed to a parameter that cannot be negative. [Note: The source code implementation of the function has been overridden by a builtin model.]
109    if (0 == fstat(fd, &info)) {

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