Fix for 265709 - suspicious cast in prnetdb on Solaris . r=wtc NSPR_4_5_BRANCH NSPR_4_5_1_RTM SECURITY_3_9_4_RC1
authorjulien.pierre.bugs%sun.com
Sat, 23 Oct 2004 20:11:05 +0000
branchNSPR_4_5_BRANCH
changeset 3202 3edf91af4f7063938ad51830e279ad015dab8beb
parent 3201 ff21e178dcc972db35beeeb8e980a947105795f4
child 3225 e090a119e7e1776ae12f2cb37c3cf6ad691b3fbc
push idunknown
push userunknown
push dateunknown
reviewerswtc
bugs265709
Fix for 265709 - suspicious cast in prnetdb on Solaris . r=wtc
pr/src/misc/prnetdb.c
--- a/pr/src/misc/prnetdb.c
+++ b/pr/src/misc/prnetdb.c
@@ -2123,21 +2123,21 @@ PR_IMPLEMENT(void *) PR_EnumerateAddrInf
                                           PRUint16          port,
                                           PRNetAddr        *result)
 {
 #if defined(_PR_HAVE_GETADDRINFO)
     PRADDRINFO *ai;
 #if defined(_PR_INET6_PROBE)
     if (!_pr_ipv6_is_present) {
         /* using PRAddrInfoFB */
-        PRIntn iter = (PRIntn) iterPtr;
+        PRIntn iter = (PRIntn) (PRPtrdiff) iterPtr;
         iter = PR_EnumerateHostEnt(iter, &((PRAddrInfoFB *) base)->hostent, port, result);
         if (iter < 0)
             iter = 0;
-        return (void *) iter;
+        return (void *) (PRPtrdiff) iter;
     }
 #endif
 
     if (iterPtr)
         ai = ((PRADDRINFO *) iterPtr)->ai_next;
     else
         ai = (PRADDRINFO *) base;