Bug 1372834

Summary: AdminUtil - lib/libadminutil/psetc.c:201: bad test
Product: Red Hat Directory Server Reporter: Noriko Hosoi <nhosoi>
Component: AdminAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED ERRATA QA Contact: Viktor Ashirov <vashirov>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 10.0CC: amsharma
Target Milestone: DS10.1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-adminutil-1.1.23-1.el7dsrv Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-07 15:40:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Noriko Hosoi 2016-09-02 20:18:19 UTC
Description of problem:
 [lib/libadminutil/psetc.c:201]: (warning) Char literal compared with pointer 'target.attrName'. Did you intend to dereference it?

Source code is

    if (target->attrName && target->attrName != '\0') PR_Free(target->attrName);

Maybe better source code

    if (target->attrName && target->attrName[0] != '\0') 
        PR_Free(target->attrName);

Comment 2 Amita Sharma 2016-09-09 08:15:42 UTC
This change is done in lib/libadminutil/psetc.c line number 201.
I have observed this line of code occurs twice in the file, but the first occurrence of mentioned code at line 121 is already correct with pointer value.

Hence marking the bug as VERIFIED.

Comment 4 errata-xmlrpc 2016-11-07 15:40:04 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/RHBA-2016-2665.html