(rexec_af): Convert rport to host order before passing it to snprintf.
authordrepper <drepper>
Sun, 15 Oct 2000 02:02:44 +0000 (02:02 +0000)
committerdrepper <drepper>
Sun, 15 Oct 2000 02:02:44 +0000 (02:02 +0000)
inet/rexec.c

index decee94..4eae8f7 100644 (file)
@@ -65,7 +65,7 @@ rexec_af(ahost, rport, name, pass, cmd, fd2p, af)
        int gai;
        char servbuff[NI_MAXSERV];
 
-       snprintf(servbuff, sizeof(servbuff), "%d", rport);
+       snprintf(servbuff, sizeof(servbuff), "%d", ntohs(rport));
        servbuff[sizeof(servbuff) - 1] = '\0';
 
        memset(&hints, 0, sizeof(hints));