Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Feb 2005 09:59:27 GMT
From:      "Kevin M. Kilbride" <kmk@ssl.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/77841: Cast away const in getpublickey()
Message-ID:  <200502210959.j1L9xR7c046045@www.freebsd.org>
Resent-Message-ID: <200502211000.j1LA0VCU025146@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502210959.j1L9xR7c046045>