Bug 1372834 - AdminUtil - lib/libadminutil/psetc.c:201: bad test
Summary: AdminUtil - lib/libadminutil/psetc.c:201: bad test
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Directory Server
Classification: Red Hat
Component: Admin
Version: 10.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: DS10.1
: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-02 20:18 UTC by Noriko Hosoi
Modified: 2020-09-13 21:35 UTC (History)
1 user (show)

Fixed In Version: 389-adminutil-1.1.23-1.el7dsrv
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-07 15:40:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 1676 0 None None None 2020-09-13 21:35:47 UTC
Red Hat Product Errata RHBA-2016:2665 0 normal SHIPPED_LIVE Red Hat Directory Server bug fix and enhancement update 2016-11-07 20:38:00 UTC

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


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