misc/77841: Cast away const in getpublickey()

Kevin M. Kilbride kmk at ssl.org
Mon Feb 21 10:00:32 GMT 2005


>Number:         77841
>Category:       misc
>Synopsis:       Cast away const in getpublickey()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 21 10:00:31 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Kevin M. Kilbride
>Release:        5.3-STABLE
>Organization:
Sapient Systems Laboratories
>Environment:
FreeBSD devel.localnet 5.3-STABLE FreeBSD 5.3-STABLE #0: Sun Feb 20 21:44:50 PST 2005     chandra at devel.localnet:/usr/src/sys/i386/compile/DEVIL  i386
>Description:
      getpublickey() declared with const formal parameter, but parameter is simply passed immediately through a chain of functions that discard const attribute of parameter. Calling function should explicitly discard const to avoid compilation errors in buildworld using CFLAGS overrides.
>How-To-Repeat:
      
>Fix:
      --- lib/libc/rpc/getpublickey.c.orig    Mon Feb 21 01:50:26 2005
+++ lib/libc/rpc/getpublickey.c Mon Feb 21 01:50:38 2005
@@ -174,5 +174,5 @@
        if (__getpublickey_LOCAL != NULL)
                return(__getpublickey_LOCAL(netname, publickey));
        else
-               return(__getpublickey_real(netname, publickey));
+               return(__getpublickey_real((char *)netname, publickey));
 }
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list