Bug 1139882 - coverity defects found in 1.3.3.x
Summary: coverity defects found in 1.3.3.x
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.1
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-09 21:52 UTC by Noriko Hosoi
Modified: 2015-03-05 09:36 UTC (History)
4 users (show)

Fixed In Version: 389-ds-base-1.3.3.1-10.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 09:36:46 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0416 normal SHIPPED_LIVE Important: 389-ds-base security, bug fix, and enhancement update 2015-03-05 14:26:33 UTC

Description Noriko Hosoi 2014-09-09 21:52:51 UTC
Description of problem:

Ticket #47890 - minor memory leaks in utilities
3. Defect type: CLANG_WARNING ¶
1. 389-ds-base-1.2.11.15/ldap/servers/slapd/tools/rsearch/nametable.c:161:5:warning – Potential leak of memory pointed to by 's'
# PR_Close(fd);
# ^~~~~~~~

4. Defect type: CLANG_WARNING
1. 389-ds-base-1.2.11.15/ldap/servers/slapd/tools/migratecred.c:164:8:warning – Potential leak of memory pointed to by 'prefixCred'
# if ( !oldpath || !newpath || !cred )
# ^~~~~~~

Ticket #47892 - coverity defects found in 1.3.3.1
Defect type: FORWARD_NULL

    9. 389-ds-base-1.3.3.1/ldap/servers/plugins/memberof/memberof.c:2079:var_compare_op – Comparing "group_norm_vals" to null implies that "group_norm_vals" might be null.
    11. 389-ds-base-1.3.3.1/ldap/servers/plugins/memberof/memberof.c:2099:var_deref_model – Passing null pointer "group_norm_vals" to function "slapi_valueset_add_value_ext(Slapi_ValueSet *, Slapi_Value const *, unsigned long)", which dereferences it.
    12. 389-ds-base-1.3.3.1/ldap/servers/slapd/valueset.c:896:2:deref_parm_in_call – Function "slapi_valueset_add_attr_valuearray_ext(Slapi_Attr const *, Slapi_ValueSet *, Slapi_Value **, int, unsigned long, int *)" dereferences "vs".
    15. 389-ds-base-1.3.3.1/ldap/servers/slapd/valueset.c:1075:2:deref_parm – Directly dereferencing parameter "vs".

Defect type: COMPILER_WARNING

    2. 389-ds-base-1.3.3.1/lib/libaccess/aclcache.cpp:136:60:warning – deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    2. 389-ds-base-1.3.3.1/lib/base/pool.cpp:411:79:warning – deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    2. 389-ds-base-1.3.3.1/lib/base/pool.cpp:389:77:warning – deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    1. 389-ds-base-1.3.3.1/lib/base/pool.cpp:283:77:warning – deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    2. 389-ds-base-1.3.3.1/lib/base/pool.cpp:262:77:warning – deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    2. 389-ds-base-1.3.3.1/lib/base/pool.cpp:181:82:warning – deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    2. 389-ds-base-1.3.3.1/ldap/servers/slapd/back-ldbm/ldif2ldbm.c:2198:78:warning – 'j' may be used uninitialized in this function [-Wmaybe-uninitialized]

    2. 389-ds-base-1.3.3.1/ldap/servers/plugins/acl/aclparse.c:538:28:warning – 'is_target_to' may be used uninitialized in this function [-Wmaybe-uninitialized]

    2. 389-ds-base-1.3.3.1/ldap/servers/plugins/acl/acl.c:2493:26:warning – 'attrFilterArray' may be used uninitialized in this function [-Wmaybe-uninitialized]

    Defect type: CLANG_WARNING

    1. 389-ds-base-1.3.3.1/ldap/servers/slapd/tools/rsearch/nametable.c:161:5:warning – Potential leak of memory pointed to by 's'
    # PR_Close(fd);
    # ^~~~~~~~

    1. 389-ds-base-1.3.3.1/ldap/servers/slapd/tools/migratecred.c:204:30:warning – Potential leak of memory pointed to by 'pluginpath'
    # libpath[sizeof(libpath)-1] = 0;
    # ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~

    1. 389-ds-base-1.3.3.1/ldap/servers/slapd/tools/migratecred.c:164:8:warning – Potential leak of memory pointed to by 'prefixCred'
    # if ( !oldpath || !newpath || !cred )
    # ^~~~~~~

    1. 389-ds-base-1.3.3.1/ldap/servers/slapd/tools/ldif.c:185:3:warning – Potential leak of memory pointed to by 'buf'
    # free( buf );
    # ^~~~

    1. 389-ds-base-1.3.3.1/ldap/servers/slapd/tools/ldif.c:145:8:warning – Potential leak of memory pointed to by 'val'
    # perror( "ldif_type_and_value" );
    # ^~~~~~

Comment 4 Amita Sharma 2015-01-07 07:54:14 UTC
Thanks Noriko, marking as VERIFIED.

Comment 6 errata-xmlrpc 2015-03-05 09:36:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0416.html


Note You need to log in before you can comment on or make changes to this bug.