Thanks to visit codestin.com
Credit goes to github.com

Skip to content

result4: ldap_parse_result() return value is not checked #40

Open
@tiran

Description

@tiran

clang's static code analyzer found this issue. The value rc is stored but never read.

} else {
int rc;
if (res_type == LDAP_RES_EXTENDED) {
struct berval *retdata = 0;
LDAP_BEGIN_ALLOW_THREADS( self );
rc = ldap_parse_extended_result( self->ldap, msg, &retoid, &retdata, 0 );
LDAP_END_ALLOW_THREADS( self );
/* handle error rc!=0 here? */
if (rc == LDAP_SUCCESS) {
valuestr = LDAPberval_to_object(retdata);
}
ber_bvfree( retdata );
}
LDAP_BEGIN_ALLOW_THREADS( self );
rc = ldap_parse_result( self->ldap, msg, &result, NULL, NULL, &refs,
&serverctrls, 0 );
LDAP_END_ALLOW_THREADS( self );
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions